13.5.3. LevelDB Cache Store Sample XML Configuration (Library Mode)
The following is a sample XML configuration of LevelDB Cache Store.
Procedure 13.7. LevelDB Cache Store Sample XML Configuration
Add the namedCache Element
Specify the LevelDB Cache Store's name using thename
parameter in thenamedCache
element as follows:<namedCache name="vehicleCache">
Add the persistence Element
Specify the value forpassivation
parameter in thepersistence
element as follows. Possible values are true and false.<namedCache name="vehicleCache"> <persistence passivation="false">
Add the leveldbStore Element
Specify the location to store the primary cache store date using thelocation
parameter in theleveldbStore
element as follows. The directory is automatically created if it does not exist. The following is an example of this step:<namedCache name="vehicleCache"> <persistence passivation="false"> <leveldbStore location="/path/to/leveldb/data" />
Set the Expired Value
Specify the location for expired data using theexpiredLocation
parameter as follows. The directory stores expired data before it is purged. The directory is automatically created if it does not exist.<namedCache name="vehicleCache"> <persistence passivation="false"> <leveldbStore location="/path/to/leveldb/data" expiredLocation="/path/to/expired/data" />
Set the Shared Parameter
Specify the value forshared
parameter in theleveldbStore
element as follows. Possible values are true and false.<namedCache name="vehicleCache"> <persistence passivation="false"> <leveldbStore location="/path/to/leveldb/data" expiredLocation="/path/to/expired/data" shared="true" />
Set the Preload Parameter
Specify the value forpreload
parameter in theleveldbStore
element as follows. Possible values are true and false.<namedCache name="vehicleCache"> <persistence passivation="false"> <leveldbStore location="/path/to/leveldb/data" expiredLocation="/path/to/expired/data" shared="true" preload="true"/> </persistence> </namedCache>