jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Vandahl ...@apache.org>
Subject Re: Updating a cache item without affecting it's removal from cache by LRU
Date Mon, 28 Dec 2009 10:53:36 GMT
Amitay Dobo wrote:
> The problem is, from what we witness, is that both checking if an item is
> still in the cache, and by updating its data, JCS  mark it as accessed, and
> the LRU Memory prevents it from being purged from the cache.

You may have a look at the CacheEvent mechanisms available in JCS
(http://jakarta.apache.org/jcs/ElementEventHandling.html). So you can
re-insert the item when an expired event occurs, for example, and save
unnecessary checks and background operations.

> * Is there a way to peek at a cache item (or just check if it exists) and
> update its data without the item being considered as accessed?

I used cache groups for this. JCS.getGroupKeys(java.lang.String group)
gives you a Set of the keys in a given group.

Bye, Thomas.

---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-users-help@jakarta.apache.org


Mime
View raw message