The facade for JCS
should be an instance of
org.wanghy.cache.provider.jcs.JcsFacade
.
Properties:
cacheManager (required).
Should be an instance of
org.apache.jcs.engine.control.CompositeCacheManager
.
We can also use the factory
org.wanghy.cache.provider.jcs.JcsCacheManagerFactoryBean
Properties:
configLocation
(optional).
Sets the location of the JCS configuration file.
The default location is "cache.ccf" in the root of the classpath.
cacheProfiles
(required).
Each cache profile should be an instance of
org.wanghy.cache.provider.jcs.JcsCacheProfile
Properties:
For general information about setting up the cache provider please read "Setting up the Cache Provider".
The cache profiles are defined as a java.util.Map
:
<bean id="cacheManager" class="org.wanghy.cache.provider.jcs.JcsCacheManagerFactoryBean"> </bean> <bean id="cacheProvider" class="org.wanghy.cache.provider.jcs.JcsFacade"> <property name="cacheManager"> <ref local="cacheManager" /> </property> <!-- Cache profiles specified as a java.util.Map --> <property name="cacheProfiles"> <map> <entry key="test"> <bean class="org.wanghy.cache.provider.jcs.JcsCacheProfile"> <property name="cacheName"> <value>testCache</value> </property> <property name="group"> <value>testGroup</value> </property> </bean> </entry> </map> </property> </bean>
The cache profiles are defined as a java.util.Properties
:
<bean id="cacheManager" class="org.wanghy.cache.provider.jcs.JcsCacheManagerFactoryBean"> </bean> <bean id="cacheProvider" class="org.wanghy.cache.provider.jcs.JcsFacade"> <property name="cacheManager"> <ref local="cacheManager" /> </property> <!-- Cache profiles specified as a java.util.Properties --> <property name="cacheProfiles"> <props> <prop key="test">[cacheName=testCache][group=testGroup]</prop> </props> </property> </bean>