From 86358dd5745829fbc998109eedecf3964203fa83 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 9 Nov 2017 17:27:52 +0100 Subject: MUC: Cache names of public rooms on eviction --- plugins/muc/mod_muc.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins') 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); -- cgit v1.2.3