Comparison

plugins/mod_blocklist.lua @ 7079:f094683ae6eb

mod_blocklist: Clear second level cache correctly on user deletion
author Kim Alvefur <zash@zash.se>
date Mon, 11 Jan 2016 15:35:51 +0100
parent 6976:4688ff9d4f2b
child 7620:c27c9695d130
comparison
equal deleted inserted replaced
7078:ec17115e3721 7079:f094683ae6eb
219 module:hook("iq-set/self/urn:xmpp:blocking:unblock", edit_blocklist); 219 module:hook("iq-set/self/urn:xmpp:blocking:unblock", edit_blocklist);
220 220
221 -- Cache invalidation, solved! 221 -- Cache invalidation, solved!
222 module:hook_global("user-deleted", function (event) 222 module:hook_global("user-deleted", function (event)
223 if event.host == module.host then 223 if event.host == module.host then
224 cache:set(event.username, nil); 224 cache2:set(event.username, nil);
225 cache[event.username] = nil; 225 cache[event.username] = nil;
226 end 226 end
227 end); 227 end);
228 228
229 -- Buggy clients 229 -- Buggy clients