一、alfresco中的ehcache介绍
为了提高系统性能,alfresco采用了许多不同的方法,使用cache就是其中之一。alfresco使用了ehcache作为其缓存。最新使用的ehcache的版本为 ehcache-core-2.0.0.jar
在alfresco中有两类ehcache:一个是用于事务的beanName为transactionalEHCacheManager,类名为org.alfresco.repo.cache.EhCacheManagerFactoryBean,不能覆盖或者集群使用;
另一个是用于共享的缓存beanName为internalEHCacheManager,类名为org.alfresco.repo.cache.InternalEhCacheManagerFactoryBean,这个缓存作为hibernate二级缓存用,在hibernate.cfg.xml中可以看到org.alfresco.repo.cache.InternalEhCacheManagerFactoryBean作为jdbc connection中hibernate.cache.provider_class属性的值。
transactionalEHCacheManager提供getObject()方法获得net.sf.ehcache.CacheManager的实例,返回的类型是Object;
internalEHCacheManager提供getObject()方法和getInstance()获得net.sf.ehcache.CacheManager的实例,区别是getObject()方法返回类型是Object,getInstance()返回类型是net.sf.ehcache.CacheManager;同时提供的buildCache()方法返回的是经过org.hibernate.cache.EhCache.EhCache(Cache cache)封装后的对象,即作为hibernate的二级缓存用。
transactionalEHCacheManager的配置文件是alfresco/ehcache-transactional.xml,在cache-context.xml中描述。
internalEHCacheManager的配置文件是alfresco/extension/ehcache-custom.xml和alfresco/ehcache-default.xml,先加载custom.xml,如果没有这个文件,再尝试加载default.xml文件。配置文件在类中设定。
二、两者的关系
所有的共享类型的缓存 Shared Cache都在cache-context.xml中被注入到事务类型的缓存中。
所有的事务类型的缓存都在ehcache-default.xml中有同名的cache的定义,以及在hibernate-context.xml 中被赋值给需要缓存的内容Dao的实现,比如qnameEntityCache赋值给qnameDAO。
三、alfresco中cache的内容
下面是alfreso中的cache缓存的内容,每种类型都包括两个缓存:即事务缓存和共享缓存。
ID lookup for QName entities
ID lookup for Namespace entities
ID lookup for Locale entities
Store and Node ID cache lookup
Parent Associations lookup for nodes
Authority container look up for users
Permissions access cache
Node owner cache
Person username to NodeRef cache
Authentication Ticket Cache
SysAdmin (JMX Config) Cache
AVM Lookup Cache
AVM Store lookup cache
WebServices Query Session Cache
ACL cache
Messages Caches
–LoadedResourceBundles
–ResourceBundleBaseNames
Dictionary / Namespace Caches
–UriToModels
–CompiledModels
Namespace Uris
–urisCache
–prefixesCache
Web Scripts Caches
分享到:
相关推荐
文档管理服务器 alfresco 中文使用教程 文档
1.11 在ALFRESCO中创建内容 6 1.12 离线编辑文件 6 1.13 在AFRESCO中寻找文件 6 1.14 在ALFRESCO中预览文件 7 1.15 版本化文件 7 1.16 在ALFRESCO中创建规则 7 1.17 创建用户 7 1.18 创建用户组 7 1.19 添加用户到...
Alfresco介绍
该插件用来记录用户在alfresco share中对文件或者文件夹在哪个时间做了什么操作的全程记录!
Alfresco cookbook Alfresco share
记录Alfresco源码开发环境搭建的过程,从源码下载到编译运行。
Alfresco 3.0的非常好的一本书,也是官网上推荐的,里面介绍了Alfresco产品体系中的各个成员的功能,以及Alfresco的部署和实现方面的知识
alfresco.终于使其能够检索中文
alfresco-grade中文,alfresco中文开发文档,由alfresco-grade.pdf用有道翻译而成,花费45大洋。用于学习研究alfresco
通过使用httpclient技术,利用alfresco提供web script来将本地文件上传到alfresco服务器中
Getting Started with Alfresco Share
Alfresco安装说明
alfresco讲解,很详尽,安装步骤alfresco讲解,
Alfresco文档管理系统1
Alfresco5.1图文说明安装
Alfresco安装后启动异常处理
基于java的CIFS实现,与alfresco相结合的服务器服务。
解压后把language_Pack/alfresco/tomcat/webapps文件加下的两个目录覆盖到tomcat/webapps下即可 然后打开tomcat\webapps\alfresco\WEB-INF\classes\alfresco下的web-client-config.xml文件,在 节点下加入 ...
Alfresco Workflow Guide.pdf