[I know the original question was posted more than a year ago, but in case anyone else is perusing these archives for a similar issue...]
I faced a similar requirement, but more so required an ordered iteration over the elements/keys. We are supporting this by using an in-memory index of all the keys (ArrayList to the rescue). Although this results in some degree of redundancy, it provides a flexible interface for when having to deal only with keys (or their indexes, such as getting the size of the cache) without having to deal with the cache itself. Joshua Szmajda wrote: > > Hi, > > I'm using JCS to replace my current cache system for a webapp, and I > need to be able to iterate through at least one region of the cache in > order to mimic the ServletContext's functionality. Is this possible? > I've been searching the mailing list archives and the API docs and > haven't found anything. > > If this isn't possible, is there a good way to do this? I was thinking > I'd just put an ArrayList in the cache with all the keys to the cached > elements in it. > > Thanks! > -Joshua Szmajda > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Iterating-tp9872118p20425270.html Sent from the JCS - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]