首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Cache在CFCACHE中已经存在错误

Cache在CFCACHE中已经存在错误
EN

Stack Overflow用户
提问于 2014-12-10 23:03:33
回答 1查看 1K关注 0票数 4

最近,我使用CFCACHE在冷融合9服务器上实现页面缓存。

不过,在load (运行自动链接检查程序)下报告的错误如下:“缓存A95C0BF9E9BFBC6F151F03E939D2D2D6TEMPLATE已经存在”

我原以为cfcache将是线程安全的,并且不需要任何额外的代码就可以处理它。如果与此相关,我将其称为application.cfc中的“application.cfc”。在我看来,这可能是一个冷融合错误,但也有可能我在某种程度上滥用了CFCACHE机制。

代码语言:javascript
复制
<!--- setup caching if enabled --->
<cfif getConfigValue('page_cache') eq "true" and not application.security.isLoggedOn()>
    <cfcache timespan="#createTimeSpan(0,0,10,0)#" directory="#application.pagecachepath#" usequerystring="true" >
</cfif>
<!--- Call request handling and rendering functions --->
<cfcontent reset="yes" type="text/html"><cfoutput>#html.render()#</cfoutput>
<cfif getConfigValue('page_cache') eq "true" and not application.security.isLoggedOn()><!-- content generated at #Now()#--></cfif>

堆栈跟踪是:

代码语言:javascript
复制
    net.sf.ehcache.ObjectExistsException: Cache A95C0BF9E9BFBC6F151F03E939D2D2D6TEMPLATE already exists at 
    net.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java:920) at 
    net.sf.ehcache.CacheManager.addCache(CacheManager.java:915) at 
    net.sf.ehcache.CacheManager.addCache(CacheManager.java:870) at 
    coldfusion.tagext.io.cache.ehcache.GenericEhcache.createCache(GenericEhcache.java:317) at 
    coldfusion.tagext.io.cache.ehcache.GenericEhcache._getCache(GenericEhcache.java:301) at 
    coldfusion.tagext.io.cache.ehcache.GenericEhcache.getCache(GenericEhcache.java:268) at 
    coldfusion.tagext.io.cache.ehcache.GenericEhcache.get(GenericEhcache.java:72) at 
    coldfusion.tagext.io.cache.CacheTagHelper.checkFromTemplateCache(CacheTagHelper.java:56) at 
    coldfusion.tagext.io.cache.CacheTag.checkTemplatecache(CacheTag.java:695) at 
    coldfusion.tagext.io.cache.CacheTag.doStartTag(CacheTag.java:609) at 
    coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2722) at cfapplication2ecfc814216694$funcONREQUEST._factor1(C:\inetpub\vhosts\example.org\httpdocs\application.cfc:190) at 
    cfapplication2ecfc814216694$funcONREQUEST.runFunction(C:\inetpub\vhosts\example.org\httpdocs\application.cfc:187) at 
    coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) at 
    coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405) at  
    coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) at

如果没有任何更好的想法,我想我将开始调查EH缓存源!

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-12-12 02:38:25

coldfusion.tagext.io.cache.ehcache.GenericEhcache中的竞赛条件

看起来它同时存在于CF9 & 10中(基于源代码)

你唯一的解决办法就是自己找个地方解决这个问题。

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/27412484

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档