diff options
author | Paweł Chmielowski <pawel@process-one.net> | 2022-09-28 18:28:24 +0200 |
---|---|---|
committer | Paweł Chmielowski <pawel@process-one.net> | 2022-09-28 18:28:24 +0200 |
commit | c99ff6059ffb4028b624d3c325505d3bb1153513 (patch) | |
tree | 7eb6a2608d6db89b6f2c75a8a3e9cb2937e7635c | |
parent | make-binaries: Bump Expat and libpng versions (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.erl | 1 |
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 |