I pretty sure that coldfusion hasn't got a cfscript alternative for the <cfobjectcache>
tag, but I was wondering if I can do the same as <cfobjectcache action="clear">
in cfscript. Any ideas?
The ObjectCacheTag on action="clear"
calls purgeQueryCache() on the DataSourceService, exposed from the ServiceFactory.
<cfscript>
createObject('java','coldfusion.server.ServiceFactory').getDataSourceService().purgeQueryCache();
</cfscript>
This is how it works in CF8, CF9 and CF10
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With