By “never” I assume you mean after more than 300 seconds you still see the incorrect results? Can you explain how the results are incorrect? Is the list stale (implying it’s the query cache that is incorrect) or are the items in the list themselves stale (hinting at the entity cache). Could you include the full ehcache.xml as well?
Chris
--
You received this message because you are subscribed to the Google Groups "ehcache-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
ehcache-user...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ehcache-users/7309a0f8-25f2-42d3-b9d2-19e3fd9eb313n%40googlegroups.com.
Hi Andy,
Sorry for the delay in replying… I usually end up answering mailing list emails in batches, but I let this batch build up for a little too long.
From memory (and it’s a long time since I did anything with Hibernate caching):
I believe having a TTL/TTI on update timestamps cache isn’t wrong as long as entries in the timestamps cache are not expired (or removed) before the query cache entries are.
I believe the way the query cache works is to cache the list of primary-ids (or some proxy of/for them) of the entities that the query returns. Hibernate will then look those entities up (potentially returning from the entity cache). In that case therefore it sounds like your problem might be with the entity cache. The first thing I would do would be to ditch the TTI settings on the caches. In a configurationlike this where you want to use TTL to control freshness of the returned data (presumably a timespan tied to some SLA/app requirement) TTI is bad because it can cause load to have the side-effect of extending the lifespan of your cached values. I would drop all the TTI settings and then try the testing again. If that doesn’t bear fruit, my next step would be to turn up debug logging in Hibernate and see if you can determine what caches are getting hit when.
Sorry I can’t be of more immediate help,
To view this discussion on the web visit https://groups.google.com/d/msgid/ehcache-users/2a0fdfb9-c582-46e4-9271-a3a08b5da62bn%40googlegroups.com.