I received this question and am bccing the recipient my response. This wasn't a personal question so I figure it is ok to go to the list and hide the author's name. > Aaron, > > I am trying to use the JCS package and I > have the following question. Is it possible to save > the cache image to a stream so that it can be saved > on to disk and/or database? > > The reason for this is that I anticipate the cache > to be fairly large and if the process that creates > this cache crashes, I would like to be able to > restart it and have the cache primed from its > previous saved image. This should cut on the time > it takes the process to repopulate the cache. > > Is there a facility or a way to do it with your > package? > Hi: The answer is yes and no. Using a disk cache will probably do most of what you need. The indexed disk cache only stores the keys on disk on shutdown. The other disk cache implementations behave differently but are not yet fully supported. The JISP disk auxiliary would be good for you. Currently there is no way to say that all elements should go to disk whent he cache is running. We could add this feature, but you should probably reply to the list to others know about the need. Most of the time you'll want to have objects that expire and the cache will manage this for you. If you are worried about failover, using a remote cache is a good idea. The remote cache is used to broadcast changes to other local caches. If you only have one local and it crashes, all the elements can be retrieved from the remote if the regions use it. This is the best failover. A lateral cache will give you the same benefit if you have multiple local caches running. There is also a session replication utility that will give you session failover using the remote cache. This hasn't been worked on recently and probably needs some work. Questions like this are good for the mailing list, so other with similar queries can get the answers from the archive. Aaron
