jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Baum, Karl" <Karl.B...@Tallan.com>
Subject RE: composite keys and cache entries keys retrieval
Date Fri, 11 Jul 2003 13:13:48 GMT
To retrieve all the in memory keys use:
 

compositeCache.getMemoryCache().getKeyArray();



-----Original Message-----
From: Fulco Houkes [mailto:foux.dev@foux.net] 
Sent: Friday, July 11, 2003 6:28 AM
To: JCS user mailinglist
Subject: composite keys and cache entries keys retrieval


Hi,

(Sorry for this cross-posting, I noticed I send it to the wrong mailing
list. My appologizes.)

I'm try to use a composite key for all the cache entries; the composite key
is combination of a pageID and a username. I need to be able to invalidate
all the cache entries related to a specific pagesID as well as all the cache
entries related to a username independently.

I tried to use groups for this purpose, but it seems the entries are
duplicated into the different groups, so it's not solving my problem. I've
been looking for using the ":" hierarchy features, but the "very-light"
documentation does present much on the subject, and I could not remove
entries using the pattern  ":"+ myKey +":". As far as I understood it, it's
only possible to use this functionality with the myKey+":" pattern.

Finally I opted to retrieve all the cache entries keys and filter myself the
entries to be invalidated. But I could not found any method (from the JCS
class) returning a Set/Enumeration/... of keys of all the the cache entries.
The IMemoryCache interface has a getKeyArray() method, which does the job,
but this method is not used within the inherited classes.

Does anyone know how to retrieve the keys of all the entries present in the
cache, without having to change the source code? 

Thanks a lot.
Fulco Houkes

Mime
View raw message