From fc794b680a635fd764f538f88586f1e05aa4b62e Mon Sep 17 00:00:00 2001 From: Evgeniy Khramtsov Date: Wed, 17 May 2017 16:03:41 +0300 Subject: [PATCH] Add cache options to the validator --- src/mod_roster.erl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/mod_roster.erl b/src/mod_roster.erl index 7a3eebbe1..d1dc714ef 100644 --- a/src/mod_roster.erl +++ b/src/mod_roster.erl @@ -1212,6 +1212,12 @@ mod_opt_type(store_current_id) -> fun (B) when is_boolean(B) -> B end; mod_opt_type(versioning) -> 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(_) -> [access, db_type, iqdisc, managers, store_current_id, - versioning]. + versioning, cache_life_time, cache_size, use_cache, cache_missed].