Merge pull request #7 from Zephyrean/master

fix: bucket eviction check was executed 1000 times more often than required
This commit is contained in:
fogfish 2015-01-24 23:08:28 +02:00
commit 01f6e3f556

View File

@ -79,7 +79,7 @@ init([], Opts, State) ->
TTL = proplists:get_value(ttl, Opts, ?DEF_CACHE_TTL),
Size = proplists:get_value(size, Opts),
Mem = proplists:get_value(memory, Opts),
Evict= cache_util:mdiv(TTL, State#cache.n),
Evict= cache_util:mdiv(TTL, State#cache.n) * 1000,
Heap = cache_heap:new(
Type
,cache_util:mdiv(TTL, State#cache.n)