4

我很确定coldfusion没有cfscript替代<cfobjectcache>标签,但我想知道我是否可以像<cfobjectcache action="clear">cfscript中那样做。有任何想法吗?

4

2 回答 2

6

ObjectCacheTag 对action="clear"DataSourceService 调用 purgeQueryCache(),从 ServiceFactory 公开。

<cfscript>
createObject('java','coldfusion.server.ServiceFactory').getDataSourceService().purgeQueryCache();
</cfscript>

这就是它在 CF8、CF9 和 CF10 中的工作方式

于 2012-07-19T08:00:31.570 回答
3

no such thing, just call an UDF that's written in CFML that calls <cfobjectcache action="clear">

update: CacheRemoveAll() in CF10 might do what you need. http://help.adobe.com/en_US/ColdFusion/10.0/CFMLRef/WSaff1f2a7b564e360784fa97f13510d891d7-8000.html

于 2012-07-19T07:36:09.413 回答