此内容没有您所选择的语言版本。
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 thenameparameter in thenamedCacheelement as follows:<namedCache name="vehicleCache">Add the persistence Element
Specify the value forpassivationparameter in thepersistenceelement 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 thelocationparameter in theleveldbStoreelement 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 theexpiredLocationparameter 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 forsharedparameter in theleveldbStoreelement 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 forpreloadparameter in theleveldbStoreelement 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>