Venkatesh
Venkatesh

Reputation: 75

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

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

Upvotes: 2

Views: 272

Answers (1)

krishna Ram
krishna Ram

Reputation: 659

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>

Upvotes: 0

Related Questions