[Opensymphony-oscache] No Exception generated after reaching cache.capacity

Tobin Juday <[email protected]> Wed, 24 Aug 2005 11:56:24 CDT
Newsgroups gmane.comp.java.open-symphony.os-cache
Message-ID <17299865.1124902622185.JavaMail.os-j2ee@opensymphony01.contegix.com>
An exception is not thrown when your cache capacity is reached.  Rather, an existing item in your cache would be flushed from the cache.  You can set the algorithm used to pick which item to flush using the cache.algorithm property.  If you don't specify this property, OSCache defaults to using the LRU algorithm.  

So if you have cached "a", and now you want to cache "b", that is a perfectly valid operation.  The cache would then just consist of "b".  The "a" is just thrown away.

If you have not specified any disk persistence options, then disk caching will not be used at all, so you shouldn't have to worry about those overflow items getting written to disk.

I do think that it would be nice to have an explicit cache.disk option you could set to false, rather than just making sure you have not configured any disk persistance options.

Tobin

---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=5331&messageID=13698#13698