<strong>CACHE IN MEMORY</strong> <strong># If you want to disable memory caching, just uncomment this line.</strong> <strong>cache.memory=false</strong>
<strong>CACHE KEY </strong> <strong># This is the key that will be used to store the cache in the application</strong> <strong>and session scope.</strong> <strong># If you want to set the cache key to anything other than the default</strong> <strong>uncomment this line and change the cache.key</strong> <strong># cache.key=__oscache_cache</strong>
<strong>USE HOST DOMAIN NAME IN KEY</strong> <strong># Servers for multiple host domains may wish to add host name info to</strong> <strong>the generation of the key. If this is true, then uncomment the</strong> <strong>following line.</strong> <strong># cache.use.host.domain.in.key=true</strong>
<strong>CACHE LISTENERS</strong> <strong># These hook OSCache events and perform various actions such as logging</strong> <strong>cache hits and misses, or broadcasting to other cache instances across a cluster.</strong> <strong>See the documentation for further information.</strong> <strong># cache.event.listeners=com.opensymphony.oscache.plugins.clustersupport.JMSBroadcastingListener, \</strong> <strong>com.opensymphony.oscache.extra.CacheEntryEventListenerImpl, \</strong> <strong>com.opensymphony.oscache.extra.CacheMapAccessEventListenerImpl, \</strong> <strong>com.opensymphony.oscache.extra.ScopeEventListenerImpl</strong>
<strong>CACHE PERSISTENCE CLASS</strong> <strong># Specify the class to use for persistence. If you use the supplied DiskPersistenceListener,</strong> <strong>don't forget to supply the cache.path property to specify the location of the cache</strong> <strong>directory.</strong> <strong># If a persistence class is not specified, OSCache will use memory caching only.</strong> <strong>#cache.persistence.class=com.opensymphony.oscache.plugins.diskpersistence.HashDiskPersistenceListener</strong> cache.persistence.class=com.opensymphony.oscache.plugins.diskpersistence.HashDiskPersistenceListener <strong>CACHE OVERFLOW PERSISTENCE</strong> <strong>Use persistent cache in overflow or not. The default value is false, which means</strong> <strong>the persistent cache will be used at all times for every entry. true is the recommended setting.</strong> <strong>#cache.persistence.overflow.only=false</strong>
<strong>CACHE DIRECTORY</strong> <strong># This is the directory on disk where caches will be stored by the DiskPersistenceListener.</strong> <strong>it will be created if it doesn't already exist. Remember that OSCache must have</strong> <strong>write permission to this directory.</strong> <strong># Note: for Windows machines, this needs \ to be escaped</strong> <strong>ie Windows:</strong> <strong>cache.path=c:\\myapp\\cache</strong> <strong>or *ix:</strong> <strong>cache.path=/opt/myapp/cache</strong> <strong>cache.path=F:\\jboss-3.2.1\\server\\default\\deploy\\weihai.war\\powercache</strong>
<strong>CACHE ALGORITHM</strong> <strong># Default cache algorithm to use. Note that in order to use an algorithm</strong> <strong>the cache size must also be specified. If the cache size is not specified,</strong> <strong>the cache algorithm will be Unlimited cache.</strong> <strong>cache.algorithm=com.opensymphony.oscache.base.algorithm.LRUCache</strong> <strong>cache.algorithm=com.opensymphony.oscache.base.algorithm.FIFOCache</strong> <strong>cache.algorithm=com.opensymphony.oscache.base.algorithm.UnlimitedCache</strong>
<strong>THREAD BLOCKING BEHAVIOR</strong> <strong># When a request is made for a stale cache entry, it is possible that another thread is already</strong> <strong>in the process of rebuilding that entry. This setting specifies how OSCache handles the</strong> <strong>subsequent 'non-building' threads. The default behaviour (cache.blocking=false) is to serve</strong> <strong>the old content to subsequent threads until the cache entry has been updated. This provides</strong> <strong>the best performance (at the cost of serving slightly stale data). When blocking is enabled,</strong> <strong>threads will instead block until the new cache entry is ready to be served. Once the new entry</strong> <strong>is put in the cache the blocked threads will be restarted and given the new entry.</strong> <strong>Note that even if blocking is disabled, when there is no stale data available to be served</strong> <strong>threads will block until the data is added to the cache by the thread that is responsible</strong> <strong>for building the data.</strong> cache.blocking=true
<strong>CACHE SIZE</strong> <strong># Default cache size in number of items. If a size is specified but not</strong> <strong>an algorithm, the cache algorithm used will be LRUCache.</strong> cache.capacity=4000
<strong>CACHE UNLIMITED DISK ??????????????????1000??????????1000???LRU?????????????????</strong> <strong>Use unlimited disk cache or not. The default value is false, which means</strong> <strong>the disk cache will be limited in size to the value specified by cache.capacity.</strong> cache.unlimited.disk=true
<strong>JMS CLUSTER PROPERTIES</strong> <strong># Configuration properties for JMS clustering. See the clustering documentation</strong> <strong>for more information on these settings.</strong> <strong>#cache.cluster.jms.topic.factory=java:comp/env/jms/TopicConnectionFactory</strong> #cache.cluster.jms.topic.name=java:comp/env/jms/OSCacheTopic #cache.cluster.jms.node.name=node1
<strong>JAVAGROUPS CLUSTER PROPERTIES</strong> <strong># Configuration properites for the JavaGroups clustering. Only one of these</strong> <strong>should be specified. Default values (as shown below) will be used if niether</strong> <strong>property is set. See the clustering documentation and the JavaGroups project</strong> <strong>(www.javagroups.com) for more information on these settings.</strong> <strong>#cache.cluster.properties=UDP(mcast_addr=231.12.21.132;mcast_port=45566;ip_ttl=32;\</strong> #mcast_send_buf_size=150000;mcast_recv_buf_size=80000):\ #PING(timeout=2000;num_initial_members=3):\ #MERGE2(min_interval=5000;max_interval=10000):\ #FD_SOCK:VERIFY_SUSPECT(timeout=1500):\ #pbcast.NAKACK(gc_lag=50;retransmit_timeout=300,600,1200,2400,4800;max_xmit_size=8192):\ #UNICAST(timeout=300,600,1200,2400):\ #pbcast.STABLE(desired_avg_gossip=20000):\ #FRAG(frag_size=8096;down_thread=false;up_thread=false):\ #pbcast.GMS(join_timeout=5000;join_retry_timeout=2000;shun=false;print_local_addr=true) #cache.cluster.multicast.ip=231.12.21.132
|