cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: Local Query Cache Problems
Date Wed, 11 Apr 2018 18:05:40 GMT
Not if it is marked as expired. In which case the cache on access will behave as if the object
is not there at all.

Andrus


> On Apr 11, 2018, at 9:03 PM, Lon Varscsak <lon.varscsak@gmail.com> wrote:
> 
> 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
View raw message