mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
mod_shared_roster: Adjust special group cache size
Let the size of the cache used for 'special' groups (such as @all@ or @online@) depend on the number of virtual hosts, as the cache will contain seperate entries per domain. Thanks to Ingo Jrgensmann for reporting the issue.
This commit is contained in:
parent
4579fd6ac7
commit
52ac941034
@ -150,7 +150,8 @@ depends(_Host, _Opts) ->
|
||||
|
||||
-spec init_cache(module(), binary(), gen_mod:opts()) -> ok.
|
||||
init_cache(Mod, Host, Opts) ->
|
||||
ets_cache:new(?SPECIAL_GROUPS_CACHE, [{max_size, 4}]),
|
||||
NumHosts = length(ejabberd_option:hosts()),
|
||||
ets_cache:new(?SPECIAL_GROUPS_CACHE, [{max_size, NumHosts * 4}]),
|
||||
case use_cache(Mod, Host) of
|
||||
true ->
|
||||
CacheOpts = cache_opts(Opts),
|
||||
|
Loading…
Reference in New Issue
Block a user