How to define spool size in JCS

JCS is one of the widely used caching solution in the market. It has one feature in which we can specify the maximum number of elements a particular cache can have before it starts evicting the old elements

cytotec buy online jcs.default.cacheattributes.MaxObjects=10000

But I faced a very strange issue. If I kept maxObjects as 5,15,25 etc, the maximum number of elements getting stores were 4,14,24 respectively. For any other number it was working fine. I tried to debug but could not find the exact cause and I also did not have much time. But I found that JCS evicts SPPOSIZE number of elements on hitting the max memory. By default the value is 2, so it was evicting 2 elements. Though I am still amazed why it was not happening for other numbers.

Anyways spoolsize is configurable and can be specified in cach.ccf file like this :

Methocarbamol mg dosage jcs.default.cacheattributes.SpoolChunkSize=1

After setting this property, things worked fine for any number of maxObjects

Uday Ogra

Connect with me at http://facebook.com/tendulkarogra and lets have some healthy discussion :)

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *