comparison 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
comparison
equal deleted inserted replaced
2015:7f90692bbd23 2016:279885fd9728
38 38
39 option type default 39 option type default
40 ------------------------------ ----------------------- --------- 40 ------------------------------ ----------------------- ---------
41 max\_archive\_query\_results number `50` 41 max\_archive\_query\_results number `50`
42 default\_archive\_policy boolean or `"roster"` `false` 42 default\_archive\_policy boolean or `"roster"` `false`
43 archive\_expires\_after string `"1w"`
43 44
44 Storage backend 45 Storage backend
45 --------------- 46 ---------------
46 47
47 mod\_mam uses the store "archive2"[^1]. See [Prosodys data storage 48 mod\_mam uses the store "archive2"[^1]. See [Prosodys data storage
64 in one request *page*. A query that does not fit in one page will 65 in one request *page*. A query that does not fit in one page will
65 include a reference to the next page, letting clients page through the 66 include a reference to the next page, letting clients page through the
66 result set. Setting large number is not recomended, as Prosody will be 67 result set. Setting large number is not recomended, as Prosody will be
67 blocked while processing the request and will not be able to do anything 68 blocked while processing the request and will not be able to do anything
68 else. 69 else.
70
71 Archive expiry
72 --------------
73
74 Messages in the archive will expire after some time, by default one
75 week. This can be changed by setting `archive_expires_after`:
76
77 ``` {.lua}
78 archive_expires_after = "1d" -- one day
79
80 archive_expires_after = "1w" -- one week, the default
81
82 archive_expires_after = "2m" -- two months
83
84 archive_expires_after = "1y" -- one year
85
86 archive_expires_after = 60 * 60 -- one hour
87
88 archive_expires_after = "never" -- forever
89 ```
90
91 The format is an integer number of seconds or a multiple of a period
92 given by a suffix that can be one of `d` (day), `w` (week), `m` (month)
93 or `y` (year). No multiplier means seconds.
69 94
70 Message matching policy 95 Message matching policy
71 ----------------------- 96 -----------------------
72 97
73 The MAM protocol includes a way for clients to control what messages 98 The MAM protocol includes a way for clients to control what messages