25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-22 17:28:25 +01:00

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.
This commit is contained in:
Paweł Chmielowski 2022-09-28 18:28:24 +02:00
parent e4c20aa674
commit c99ff6059f

View File

@ -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