Software /
code /
prosody
Comparison
plugins/mod_blocklist.lua @ 6967:d90a4d6a0e2c
mod_blocklist: Clear second level cache when user is deleted
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 05 Dec 2015 22:46:50 +0100 |
parent | 6944:62b6f6d230f1 |
child | 6968:828a10e0464b |
comparison
equal
deleted
inserted
replaced
6963:e3be91ccca05 | 6967:d90a4d6a0e2c |
---|---|
184 module:hook("iq-set/self/urn:xmpp:blocking:unblock", edit_blocklist); | 184 module:hook("iq-set/self/urn:xmpp:blocking:unblock", edit_blocklist); |
185 | 185 |
186 -- Cache invalidation, solved! | 186 -- Cache invalidation, solved! |
187 module:hook_global("user-deleted", function (event) | 187 module:hook_global("user-deleted", function (event) |
188 if event.host == module.host then | 188 if event.host == module.host then |
189 cache:set(event.username, nil); | |
189 cache[event.username] = nil; | 190 cache[event.username] = nil; |
190 end | 191 end |
191 end); | 192 end); |
192 | 193 |
193 -- Buggy clients | 194 -- Buggy clients |