Purgatory is simply a buffer that discards the oldest when it fills up. It's a buffer in front of the disk cache. Items can be retrieved from purgatory until they are written to disk. Once written to disk, they are removed from purgatory. At that point, they must be retrieved.
By default, items only go to disk on two occasions: 1) on order shutdown, and 2) when the memory size limit is reached. You can also configure the cache to put items on disk when they are added to the cache by setting the diskUsagePattern to UPDATE. Items will then put put on disk when they are put into the cache. You still need a relatively orderly shutdown to get the keys on disk. You could also use a JDBC disk cache which doesn't keep the keys in memory. This provides more crash safety. Aaron --- Hans Liebenberg <[EMAIL PROTECTED]> wrote: > Hi, > > I have been reading through the docs and trying out > a few permutations > of configurations but am still not 100% sure I have > solved my needs. > > My system has always used LRUMemoryCache only. Which > is fast and works > perfectly for me. The obvious disadvantage is the > entire cache being > destroyed across restarts. > I now have the following requirements: > I effectively want a pure master LRUMemoryCache, but > with background > disk caching for restart initialization, i.e all > reads are done from > LRUMemoryCache , but the LRUMemoryCache cache gets > initialized from disk > on a restart. > > From what I understand the Purgatory system is > exactly what I need as > reads will first check purgatory then disk. > > Is it possible to never have to check disk, i.e if > its not in ram then > assume it doesn't exist, the only disk READ should > be on initialization? > > The reason I ask this is I have set up a load test > that hits my system, > and it seems that alot of reads from cache (disk) is > dramatically slower > then when I use a pure memory cache. > So to sum it up, I want a LRUMemoryCache with the > ability to write > itself to disk in the background asynchronously so > that it can be > initialized to its previous state (or even part > thereof) across restarts. > > Thank you for your time > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]