Composition of TTLCache can lead to inconsistent cache lookups

Description

If a TTL cache composes another cache, the presence of a key has to be checked both against the TTL list and the composed cache. Otherwise, the TTL cache could say that an item is still present (because the TTL has not yet expired), but the item is removed from the composed cache. In such a case, a user will get a true from has? but a nil from lookup (because the key is no longer present in the composed cache).

Environment

Any platform. Clojure v1.8; core.cache v0.6.5

Activity

Show:
Sean Corfield
March 2, 2018, 7:35 AM

Release 0.7.0

Sean Corfield
March 1, 2018, 4:52 AM

has been fixed for the next release.

import
February 19, 2018, 9:43 AM

Indeed. Sorry, missed that ticket.

Ivan Kryvoruchko
February 19, 2018, 9:35 AM

I think it's the same issue (and even fix is literally the same ) https://dev.clojure.org/jira/browse/CCACHE-46

Duplicate

Assignee

Sean Corfield

Reporter

import

Labels

Approval

None

Patch

Code and Test

Priority

Major