cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lon Varscsak <lon.varsc...@gmail.com>
Subject Re: Local Query Cache Problems
Date Wed, 11 Apr 2018 18:03:47 GMT
If an object stays in this cache though, don't I get potentially stale
objects back later?

On Wed, Apr 11, 2018 at 6:28 AM, Andrus Adamchik <andrus@objectstyle.org>
wrote:

>
>
> > On Apr 10, 2018, at 6:47 PM, John Huss <johnthuss@gmail.com> 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
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message