Berkeley DB Disk Auxiliary Cache Aaron Smuts

The Berkeley DB Disk Auxiliary Cache is an optional plugin for the JCS. It is primarily intended to provide a secondary store to ease the memory burden of the cache. When the memory cache exceeds its maximum size it tells the cache hub that the item to be removed from memory should be spooled to disk. The cache checks to see if any auxiliaries of type "disk" have been configured for the region. If the "Berkeley DB Disk Auxiliary Cache" is used, the item will be spooled to disk.

The Berkeley DB is far slower than the Indexed Disk Cache, especially for puts. This is partially due to the fact that the BDB store its keys on disk. However, any items stored in the BDB will be available on restart, even if the cache is not shutdown properly.

The Berkeley DB requires jdk1.4 and above. As such, it is distributed in the jdk14-ext jar.

The simple configuration and is done in the auxiliary cache section of the cache.ccf configuration file. In the example below, I created a Berkeley DB Auxiliary Cache referenced by BDBDC. It uses files located in the "DiskPath" directory.