|
@@ -44,9 +44,9 @@ evict_older_than({cache, StartTs, Dict}, MaxAge) ->
|
|
end,
|
|
end,
|
|
{[], dict:new()},
|
|
{[], dict:new()},
|
|
Dict),
|
|
Dict),
|
|
- Cache1 = case dict:is_empty(Dict1) of
|
|
|
|
- true -> empty;
|
|
|
|
- false -> {cache, StartTs, Dict1}
|
|
|
|
|
|
+ Cache1 = case dict:size(Dict1) of
|
|
|
|
+ 0 -> empty;
|
|
|
|
+ _ -> {cache, StartTs, Dict1}
|
|
end,
|
|
end,
|
|
{Evicted, Cache1};
|
|
{Evicted, Cache1};
|
|
evict_older_than(empty, _) ->
|
|
evict_older_than(empty, _) ->
|