【问题标题】:How to check if the cache is exists using coldFusion 8?如何使用coldFusion 8检查缓存是否存在?
【发布时间】:2014-12-04 20:24:40
【问题描述】:

coldFusion 10 中包含 CacheIdExists(),用于查找缓存中存在的结构,但我需要检查缓存中是否存在结构,使用 ColdFusion 8

【问题讨论】:

    标签: cfcache


    【解决方案1】:

    您可以使用操作“GET”。

    例如:

    <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>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-05-06
      • 2012-08-10
      • 2020-02-23
      • 1970-01-01
      • 2017-09-04
      • 1970-01-01
      • 2018-10-31
      相关资源
      最近更新 更多