How to check if the cache is exists using coldFusion 8?

275 Views Asked by At

In the coldFusion 10 contains CacheIdExists(),it used to find the structure exists in cache but I need to check If the structure exists in cache, Using ColdFusion 8

1

There are 1 best solutions below

0
On BEST ANSWER

You can use action 'GET'.

Ex:

<cfquery name="cached" cachedwithin="10" datasource="TSQL">
    SELECT * from HR.Employees;
</cfquery>

<cfcache action="get"  name="test" id="cached">
<cfif not structkeyExists(variables, "test")>
    <cfoutput >
        Exists
    </cfoutput>
</cfif>