- 浏览: 239257 次
- 性别:
- 来自: 上海
文章分类
最新评论
-
di1984HIT:
学习了。
CMS项目中用到的技术(全) -
di1984HIT:
就是用xml麻烦~
RESTEasy入门 -
di1984HIT:
学习了~~
RESTEasy入门 -
真三武侯:
写得很好,感谢分享经验心得!
RESTEasy入门 -
fangcensi:
是不是还有一个application文件,没写出来
RESTEasy入门
#一、内存缓存或硬盘、数据库缓存 cache.memory=false #二、缓存的最大数量。默认是不限制,cache不会移走任何缓存内容。负数被视不限制。 cache.capacity=100 #三、运算规则。为了使用规则,cache的size必须是指定的。 #如果cache的size不指定的话, 将不会限制缓存对象的大小。如果指定了cache的size,但不指定algorithm,那它会默认使用:com.opensymphony.oscache.base.algorithm.LRUCache #有下面三种规则: #*com.opensymphony.oscache.base.algorithm.LRUCache: #last in first out(最后插入的最先调用)。默认选项。 #*com.opensymphony.oscache.base.algorithm.FIFOCache: #first int first out(最先插入的最先调用)。 #*com.opensymphony.oscache.base.algorithm.UnlimitedCache : #cache中的内容将永远不会被丢弃。 #如果cache.capacity不指定值的话,它将被设为默认选项。 cache.algorithm=com.opensymphony.oscache.base.algorithm.LRUCache #四、是否同步。true 或者 false。一般设为true,避免读取脏数据。 cache.blocking=true #五、指定硬盘缓存是否要作限制。默认值为false。false的状况下,disk cache capacity 和cache.capacity的值相同。 cache.unlimited.disk=false #六、指定类是被持久化缓存的类。class必须实现PersistenceListener接口。 #作为硬盘持久,可以实现com.opensymphony.oscache.plugins.diskpersistence.HashDiskPersistenceListener接口。 #它把class的toString()输出的hash值作为文件的名称。如果你要想文件名易读些(自己设定),DiskPersistenceListener 的父类也能使用,但其可能有非法字符或者过长的名字。 #注意:HashDiskPersistenceListener 和 DiskPersistenceListener 需要设定硬盘路径:cache.path #cache.persistence.class= #七、指定硬盘缓存的路径。目录如果不存在将被建立。同时注意oscache应该要有权限写文件系统。 #例: cache.path=c:\\myapp\\cache cache.path=/opt/myapp/cache cache.path=e:\\index\\cache #八、指定是否只有在内存不足的情况下才使用硬盘缓存。 #默认值false。但推荐是true如果内存cache被允许的话。这个属性彻底的改变了cache的行为,使得persisted cache和memory是完全不同。 cache.persistence.overflow.only=false #九、class名列表(用逗号隔开)。每个class必须实现以下接口中的一个 或者几个 #CacheEntryEventListener:接收cache add/update/flush and remove事件 #CacheMapAccessEventListener :接收cache访问事件。这个可以让你跟踪cache怎么工作。 #默认是不配置任何class的。当然你可以使用一下的class: #*com.opensymphony.oscache.plugins.clustersupport.BroadcastingCacheEventListener : 分布式的监听器。可以广播到局域网内的其他cache实例。 #* com.opensymphony.oscache.extra.CacheEntryEventListenerImpl :一个简单的监听器。在cache的生命周期中记录所有entry的事件。 #* com.opensymphony.oscache.extra.CacheMapAccessEventListenerImpl : 记录count of cache map events(cache hits,misses and state hits). #cache.event.listeners #十、在application 和 session的作用域时 用于标识cache 对象的, 用于ServletCacheAdministrator;此属性不是指定为"__oscache_cache"格式时为默认值, 如果代码中需要用到默认值时可以通使用com.opensymphony.oscache.base.Const.DEFAULT_CACHE_KEY 来取得; cache.key=__oscache_cache #十一、当配置多个服务器时,想通过服备器名称自动生成cache key时,可将此属性设为true. 默认值为false; cache.use.host.domain.in.key=true #十二、 在以上基础选项之上可以加入一些额外的属性到此文件中.例: JavaGroupsBroadcastingListener 便是额外的 #Additional Properties #十三、用于缓存集群. 默认为231.12.21.132 #cache.cluster.multicast.ip #十四、 指集群中的额外配置项. 以下是默认设置:(此属性的相关说将在集群文档中说明) #UDP(mcast_addr=231.12.21.132;mcast_port=45566;ip_ttl=32;\ #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.properties # CACHE IN MEMORY # # If you want to disable memory caching, just uncomment this line. # # cache.memory=false # CACHE KEY # # This is the key that will be used to store the cache in the application # and session scope. # # If you want to set the cache key to anything other than the default # uncomment this line and change the cache.key # # cache.key=__oscache_cache # USE HOST DOMAIN NAME IN KEY # # Servers for multiple host domains may wish to add host name info to # the generation of the key. If this is true, then uncomment the # following line. # # cache.use.host.domain.in.key=true # CACHE LISTENERS # # These hook OSCache events and perform various actions such as logging # cache hits and misses, or broadcasting to other cache instances across a cluster. # See the documentation for further information. # # cache.event.listeners=com.opensymphony.oscache.plugins.clustersupport.JMSBroadcastingListener, \ # com.opensymphony.oscache.extra.CacheEntryEventListenerImpl, \ # com.opensymphony.oscache.extra.CacheMapAccessEventListenerImpl, \ # com.opensymphony.oscache.extra.ScopeEventListenerImpl, \ # com.opensymphony.oscache.extra.StatisticListenerImpl # CACHE PERSISTENCE CLASS # # Specify the class to use for persistence. If you use the supplied DiskPersistenceListener, # don't forget to supply the cache.path property to specify the location of the cache # directory. # # If a persistence class is not specified, OSCache will use memory caching only. # # cache.persistence.class=com.opensymphony.oscache.plugins.diskpersistence.DiskPersistenceListener # cache.persistence.class=com.opensymphony.oscache.plugins.diskpersistence.HashDiskPersistenceListener # CACHE OVERFLOW PERSISTENCE # Use persistent cache in overflow or not. The default value is false, which means # the persistent cache will be used at all times for every entry. true is the recommended setting. # # cache.persistence.overflow.only=true # CACHE DIRECTORY # # This is the directory on disk where caches will be stored by the DiskPersistenceListener. # it will be created if it doesn't already exist. Remember that OSCache must have # write permission to this directory. # # Note: for Windows machines, this needs \ to be escaped # ie Windows: # cache.path=c:\\myapp\\cache # or *ix: # cache.path=/opt/myapp/cache # # cache.path=c:\\app\\cache # CACHE ALGORITHM # # Default cache algorithm to use. Note that in order to use an algorithm # the cache size must also be specified. If the cache size is not specified, # the cache algorithm will be Unlimited cache. # # cache.algorithm=com.opensymphony.oscache.base.algorithm.LRUCache # cache.algorithm=com.opensymphony.oscache.base.algorithm.FIFOCache # cache.algorithm=com.opensymphony.oscache.base.algorithm.UnlimitedCache # THREAD BLOCKING BEHAVIOR # # When a request is made for a stale cache entry, it is possible that another thread is already # in the process of rebuilding that entry. This setting specifies how OSCache handles the # subsequent 'non-building' threads. The default behaviour (cache.blocking=false) is to serve # the old content to subsequent threads until the cache entry has been updated. This provides # the best performance (at the cost of serving slightly stale data). When blocking is enabled, # threads will instead block until the new cache entry is ready to be served. Once the new entry # is put in the cache the blocked threads will be restarted and given the new entry. # Note that even if blocking is disabled, when there is no stale data available to be served # threads will block until the data is added to the cache by the thread that is responsible # for building the data. # # cache.blocking=false # CACHE SIZE # # Default cache size in number of items. If a size is specified but not # an algorithm, the cache algorithm used will be LRUCache. # #cache.capacity=1000 # CACHE UNLIMITED DISK # Use unlimited disk cache or not. The default value is false, which means # the disk cache will be limited in size to the value specified by cache.capacity. # # cache.unlimited.disk=false # JMS CLUSTER PROPERTIES # # Configuration properties for JMS clustering. See the clustering documentation # for more information on these settings. # #cache.cluster.jms.topic.factory=java:comp/env/jms/TopicConnectionFactory #cache.cluster.jms.topic.name=java:comp/env/jms/OSCacheTopic #cache.cluster.jms.node.name=node1 # JAVAGROUPS CLUSTER PROPERTIES # # Configuration properites for the JavaGroups clustering. Only one of these # should be specified. Default values (as shown below) will be used if niether # property is set. See the clustering documentation and the JavaGroups project # (www.javagroups.com) for more information on these settings. # #cache.cluster.properties=UDP(mcast_addr=231.12.21.132;mcast_port=45566;ip_ttl=32;\ #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
发表评论
-
Java基本功——Reference
2011-10-08 17:52 1075版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声 ... -
Caused by: org.codehaus.jackson.map.JsonMappingException
2011-08-29 16:09 12327写道 No serializer found for cla ... -
JVM监控工具介绍jstack, jconsole, jinfo, jmap, jdb, jstat(2)
2011-08-10 13:44 3799如果能熟练运用这些命令,尤其是在linux下,那么完全可以代替 ... -
JVM监控工具介绍jstack, jconsole, jinfo, jmap, jdb, jstat (1)
2011-08-10 13:44 1138jstack -- 如果java程序崩溃生成core文 ... -
IT公司中最流行的10种编程语言
2011-08-05 13:12 9411. C语言 C语言是一种 ... -
JDK自带线程池总类介绍介绍
2011-07-28 20:38 6931、newFixedThreadPool创建一个指定工作线程数 ... -
深入浅出多线程(4)对CachedThreadPool OutOfMemoryError问题的一些想法
2011-07-28 20:37 1488线程池是Conncurrent包提供给我们的一个重要的礼物。 ... -
Java多线程--让主线程等待所有子线程执行完毕
2011-07-28 19:25 3309数据量很大百万条记录,因此考虑到要用多线程并发执行,在写 ... -
Quartz管理类
2011-07-18 17:11 1160package com.sihuatech.project.t ... -
JAVA写文件到FTP的几种方法
2011-07-18 11:32 25891.使用URL: URL url = n ... -
为什么会出现 java.util.ConcurrentModificationException 异常?
2011-07-15 14:47 1455工作中碰到个ConcurrentModificationExc ... -
装饰模式
2011-07-12 11:41 12051) 装饰模式 装饰模式 (Decor ... -
全面解析Java中的String对象的数据类型
2011-07-11 12:56 9661. 首先String不属于8种基本数据类型,String是一 ... -
oscache使用指南
2011-07-07 15:19 2428一、简介 Cache是一种用于提高系统响应速度、改善 ... -
java文件操作
2011-07-05 12:10 699package Test; import ja ... -
map的三种遍历方法!
2011-07-04 13:27 920集合的一个很重要的操作---遍历,学习了三种遍历方法,三种 ... -
Java中String类型的参数传递问题的解析
2011-06-29 18:31 1148publicclass StringAsParamOfMeth ... -
not in 优化
2011-06-20 14:35 145501.select * from emp where emp_ ... -
简单工厂模式与策略模式的区别
2011-06-14 16:10 3245工厂(Factory)模式我们可以做如下理解,假设有一个A ... -
UML中的关系
2011-05-30 17:14 879uml定义的关系主要有六种:依赖、类属、关联、实现、聚合和组合 ...
相关推荐
OScache配置 缓存技术 一、缓存整个页面 在 OSCache组件中提供了一个CacheFilter用于实现页面级的缓存,主要用于对web应用中的某些动态页面进行缓存,尤其是那些需要生成PDF 格式文件/报表、图片文件等的页面,...
二级缓存插件OScache配置,很好的学习资料
OSCache由OpenSymphony设计,它是一种开创性的JSP定制标记应用,提供了在现有JSP页面之内实现快速内存缓冲的功能。OSCache是一个广泛采用的高性能的J2EE缓存框架,OSCache能用于任何Java应用程序的普通的缓存解决...
最全的配置文件资料,springMvc包含josn、xml、文件下载、静态资源配置、日志拦截器、freeMarker、错误日志、国际化等各种配置
本文叙述了如何使用oscanche,最后的配置需要在oscache.properties中完成
springmvc最全的配置文件资料,springMVC包含json、xml、文件下载、静态资源配置、日志拦截器、freeMarker、错误日志、国际化等各种配置
OSCACHE配置,文档,示例,JAR包,非常齐全
看就知道......................
缓存框架oscache 的使用实例和详细解释,
oscache-2.1.jar oscache-2.1.jar
NULL 博文链接:https://yanxiansheng.iteye.com/blog/1636690
源代码 博文链接:https://ooft.iteye.com/blog/1262608
javaweb做页面缓存常用,OSCache是一个工业级的J2EE缓存实现。OSCache不但能缓存java对象,还可以缓存页面,http请求和二进制内容,例如pdf文件等。通过应用OSCache,我们不但可以实现通常的Cache功能,还能够改善...
OSCache标记库由OpenSymphony设计,它是一种开创性的缓存方案,它提供了在现有JSP页面之内实现内存缓存的功能。OSCache是个一个被广泛采用的高性能的J2EE缓存框架,OSCache还能应用于任何Java应用程序的普通的缓存...
OSCache标记库由OpenSymphony设计,... 支持集群--集群缓存数据能被单个的进行参数配置,不需要修改代码。 缓存记录的过期--你可以有最大限度的控制缓存对象的过期,包括可插入式的刷新策略(如果默认性能不需要时)。
1、OSCache是什么? 2、OSCache的特点 3、有关“用OSCache进行缓存对象”的研究
oscache缓存技术入门实例
OSCache学习例子 实例 很好的与j2ee结合
Cache是一种用于提高系统响应速度、改善系统运行性能的技术。尤其是在Web应用中,通过缓存页面的...OSCache是个一个被广泛采用的高性能的J2EE缓存框架,OSCache还能应用于任何Java应用程序的普通的缓存解决方案。。。。
使用oscache进行缓存,大大提高web系统运行效率