diff mod_mam/README.markdown @ 2016:279885fd9728

mod_mam: Add support for trimming old archived messages
author Kim Alvefur <zash@zash.se>
date Tue, 19 Jan 2016 13:34:16 +0100
parents 7f90692bbd23
children d44ac0756c46
line wrap: on
line diff
--- a/mod_mam/README.markdown	Tue Jan 19 13:31:11 2016 +0100
+++ b/mod_mam/README.markdown	Tue Jan 19 13:34:16 2016 +0100
@@ -40,6 +40,7 @@
   ------------------------------ ----------------------- ---------
   max\_archive\_query\_results   number                  `50`
   default\_archive\_policy       boolean or `"roster"`   `false`
+  archive\_expires\_after        string                  `"1w"`
 
 Storage backend
 ---------------
@@ -67,6 +68,30 @@
 blocked while processing the request and will not be able to do anything
 else.
 
+Archive expiry
+--------------
+
+Messages in the archive will expire after some time, by default one
+week. This can be changed by setting `archive_expires_after`:
+
+``` {.lua}
+archive_expires_after = "1d" -- one day
+
+archive_expires_after = "1w" -- one week, the default
+
+archive_expires_after = "2m" -- two months
+
+archive_expires_after = "1y" -- one year
+
+archive_expires_after = 60 * 60 -- one hour
+
+archive_expires_after = "never" -- forever
+```
+
+The format is an integer number of seconds or a multiple of a period
+given by a suffix that can be one of `d` (day), `w` (week), `m` (month)
+or `y` (year). No multiplier means seconds.
+
 Message matching policy
 -----------------------