Bryan,
Currently shared cache has no expiration. I couldn't find the right Map
implementation ... I settled on the simplest LRUMap from Jakarta. Other
alternatives where either too bulky (os-cache) or had concurrent access
bugs... If anyone knows of a robust LRU Map with configurable expiration
policy, I'd like to hear about it. I suspect in the end I may end up
writing one myslef.
Andrus
> I'm trying a cached query for a mostly read-only entity -- setName(),
> setCachePolicy(SHARED_CACHE), setRefreshingObjects(false) -- and it's
> working fine. What's the expected lifetime of the cached results? Will
> the query ever refetch from the database because the cache has expired
> or been cleaned up in some way?
>
> I guess if I want to insure that the query refetches from the database
> occasionally, I should make the policy be LOCAL_CACHE so it gets
> refreshed with each new dataContext, right?
>
> Even if that last part makes sense, I'm still curious about how the
> lifetime of the shared cache.
>
> Thanks,
> Bryan
This archive was generated by hypermail 2.0.0 : Thu Dec 09 2004 - 15:29:58 EST