jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hanson Char <HC...@realm.com>
Subject RE: composite keys and cache entries keys retrieval
Date Fri, 11 Jul 2003 13:10:40 GMT
>in memory

should be in the cache system, not necessarily in memory.

-----Original Message-----
From: Hanson Char 
Sent: Friday, July 11, 2003 8:10 AM
To: 'Turbine JCS Users List'
Subject: RE: composite keys and cache entries keys retrieval

This sounds like a cache as relational database feature to me, in that when
a cache is created, the "schema" of the cache can be specified so that
multiple "indexes" to each cache item can be automatically updated by the
cache provider code when items are add/update/delete to the specific cache.

If such feature is available, one can retrieve a cache item not only via 1
key (composite or not) but via other "candidate keys" as well.  Yet there
will exist only 1 copy of cache item in memory at all time.


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


(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

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