AurumAS/DoubleCache

When in-memory cache size < Redis cache size, cached items may remain resident after TTL expires

cbigsby opened this issue · 1 comments

@Ulriksen

Steps to reproduce:

  1. Set your in-memory cache's size to 1 MB and a default TTL of 5 minutes.
  2. Store a bunch of items in your cache so that they total >1 MB. The oldest ones will be evicted from your in-memory cache but will stay resident in Redis.
  3. Wait ~4 minutes.
  4. Request the oldest item again, which should pull it from Redis into your in-memory cache.

What should happen: The cached item's TTL should be ~1 minute in both Redis and in-memory.
What actually happens: The cached item's TTL is 5 minutes in-memory and ~1 minute in Redis.

If you're still using doublecache, it would be awesome if you could have a look at 35ffe0e. It's in branch AllowNullItems2 and nuget 2.0.0-beta8