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

Add cache options to the validator

This commit is contained in:
Evgeniy Khramtsov 2017-05-17 16:03:41 +03:00
parent a71065fcda
commit fc794b680a

View File

@ -1212,6 +1212,12 @@ mod_opt_type(store_current_id) ->
fun (B) when is_boolean(B) -> B end; fun (B) when is_boolean(B) -> B end;
mod_opt_type(versioning) -> mod_opt_type(versioning) ->
fun (B) when is_boolean(B) -> B end; fun (B) when is_boolean(B) -> B end;
mod_opt_type(O) when O == cache_life_time; O == cache_size ->
fun (I) when is_integer(I), I > 0 -> I;
(infinity) -> infinity
end;
mod_opt_type(O) when O == use_cache; O == cache_missed ->
fun (B) when is_boolean(B) -> B end;
mod_opt_type(_) -> mod_opt_type(_) ->
[access, db_type, iqdisc, managers, store_current_id, [access, db_type, iqdisc, managers, store_current_id,
versioning]. versioning, cache_life_time, cache_size, use_cache, cache_missed].