aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-11-09 17:27:52 +0100
committerKim Alvefur <zash@zash.se>2017-11-09 17:27:52 +0100
commitfc6e0a089d6d54aa547014eb4217fa77fe8fc3a4 (patch)
tree658da1995c55104f5f990d8e6ce726e44f9df4bc
parente24d16dca8a8c4cdf57732e68eaf45d5e051d5b3 (diff)
downloadprosody-fc6e0a089d6d54aa547014eb4217fa77fe8fc3a4.tar.gz
prosody-fc6e0a089d6d54aa547014eb4217fa77fe8fc3a4.zip
MUC: Cache names of public rooms on eviction
-rw-r--r--plugins/muc/mod_muc.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/muc/mod_muc.lua b/plugins/muc/mod_muc.lua
index f0eb1de8..3b25f997 100644
--- a/plugins/muc/mod_muc.lua
+++ b/plugins/muc/mod_muc.lua
@@ -118,6 +118,7 @@ local eviction_hit_rate = module:measure("room_eviction", "rate");
local rooms = cache.new(module:get_option_number("muc_room_cache_size", 100), function (jid, room)
module:log("debug", "Evicting room %s", jid);
eviction_hit_rate();
+ room_items_cache[room.jid] = room:get_public() and room:get_name() or nil;
room_save(room, nil, true); -- Force to disk
end);