fogfish/cache

cache:ttl(...) returns negative value

fogfish opened this issue · 0 comments

(cache@localhost.localdomain)1> cache:start_link(c, [{n,10}, {ttl, 60}]).
{ok,<0.68.0>}
(cache@localhost.localdomain)2> cache:put(c, x, test, 10).
ok
(cache@localhost.localdomain)3> cache:ttl(c, x).
6
(cache@localhost.localdomain)4> timer:sleep(10000).
ok
(cache@localhost.localdomain)5> cache:ttl(c, x).
-4
(cache@localhost.localdomain)6>