Re: Local Query Cache Problems

Andrus Adamchik <[email protected]>
Newsgroups gmane.comp.java.cayenne.devel
Message-ID <[email protected]>

> On Apr 10, 2018, at 6:47 PM, John Huss <[email protected]> wrote:
> 
> 1) Data written to the Local query cache will survive the lifetime of the
> ObjectContext. If the cache group it is written to does not have an
> explicit expiration time, then it will stay in the cache forever until you
> run out of memory.

I will need more time to comment on the bigger picture. But let me address this point. Admittedly I used OSCache over the years, and only recently switched to EhCache, so I may be overlooking something EhCache-specific, but anyways... 

"Stay in the cache forever until you run out of memory" has never been an issues, because the cache would normally have a max size and LRU parameters. So unused data would simply be cycled out and we don't have to worry about explicitly removing it. Also EhCache may actively remove expired items (?), but OSCache certainly did not, and it was not a problem either, also because of maxsize/LRU. 

So in other words, a properly sized cache should take care of all these issues automatically.

Andrus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.