mirror of
https://github.com/valitydev/cache.git
synced 2024-11-06 01:45:19 +00:00
Merge pull request #7 from Zephyrean/master
fix: bucket eviction check was executed 1000 times more often than required
This commit is contained in:
commit
01f6e3f556
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user