Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/processone/ejabberd.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Chmielowski <pawel@process-one.net>2022-09-28 19:28:24 +0300
committerPaweł Chmielowski <pawel@process-one.net>2022-09-28 19:28:24 +0300
commitc99ff6059ffb4028b624d3c325505d3bb1153513 (patch)
tree7eb6a2608d6db89b6f2c75a8a3e9cb2937e7635c
parente4c20aa67415e9c8b56b6fe92adc631590d01562 (diff)
Fix cache invalidation in shared roster
Doing srg_get_info for not existing group, then srg_create, will make srg_add_user fail because it will get info that group doesn't exist from cache.
-rw-r--r--src/mod_shared_roster.erl1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mod_shared_roster.erl b/src/mod_shared_roster.erl
index 7d59e2fc9..69bbc520d 100644
--- a/src/mod_shared_roster.erl
+++ b/src/mod_shared_roster.erl
@@ -422,6 +422,7 @@ create_group(Host, Group, Opts) ->
end,
case use_cache(Mod, Host) of
true ->
+ ets_cache:delete(?GROUP_OPTS_CACHE, {Host, Group}, cache_nodes(Mod, Host)),
ets_cache:insert(?GROUP_OPTS_CACHE, {Host, Group}, Opts, cache_nodes(Mod, Host));
_ ->
ok