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
1 changed files with 1 additions and 0 deletions

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