25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

fixes default value for cache_life_time

This commit is contained in:
Evgeniy Khramtsov 2010-09-21 04:31:18 +10:00
parent 2e75faefae
commit d4480c1361

View File

@ -205,7 +205,7 @@ init([Host, Opts]) ->
{attributes, record_info(fields, caps_features)}]), {attributes, record_info(fields, caps_features)}]),
mnesia:add_table_copy(caps_features, node(), disc_only_copies), mnesia:add_table_copy(caps_features, node(), disc_only_copies),
MaxSize = gen_mod:get_opt(cache_size, Opts, 1000), MaxSize = gen_mod:get_opt(cache_size, Opts, 1000),
LifeTime = gen_mod:get_opt(cache_life_time, Opts, timer:hours(24)), LifeTime = gen_mod:get_opt(cache_life_time, Opts, timer:hours(24) div 1000),
cache_tab:new(caps_features, [{max_size, MaxSize}, {life_time, LifeTime}]), cache_tab:new(caps_features, [{max_size, MaxSize}, {life_time, LifeTime}]),
HostB = list_to_binary(Host), HostB = list_to_binary(Host),
ejabberd_hooks:add(user_send_packet, HostB, ?MODULE, user_send_packet, 75), ejabberd_hooks:add(user_send_packet, HostB, ?MODULE, user_send_packet, 75),