CacheGet

説明

キャッシュに保管されているオブジェクトを取得します。

戻り値

キャッシュに保管されているオブジェクト

カテゴリ

キャッシュ関数

関数のシンタックス

CacheGet(id, [cacheName])
CacheGet(id, [cacheName])
CacheGet(id, [cacheName])

関連項目

cfcacheCachePutCacheGetAllIdsCacheGetMetadataCacheGetPropertiesCacheRemoveCacheSetProperties

履歴

ColdFusion(2018 リリース):パラメーター cacheRegion の名前が cacheName に変更されました。

ColdFusion 10:region パラメーターが追加されました。

ColdFusion 9: この関数が追加されました。

パラメータ

パラメーター

説明

id

キャッシュオブジェクトの作成時に割り当てられた ID です。

cacheName

(オプション)キャッシュオブジェクトを配置可能なキャッシュを指定します。

<cfscript>
//プロパティをもたないキャッシュ領域を作成
rProps={};
CacheRegionNew(&quot;aRegion&quot;,rProps,true);
// create object myObj
myObj={};
myObj.a=&quot;hello&quot;;
myObj.b=&quot;world&quot;;
// store myObj in the cache region
CachePut(&quot;id_1&quot;,myObj,createTimespan(0,0,30,0),createTimespan(0,0,15,0),&quot;aRegion&quot;);
// get object myObj that は aRegion の id_1 に格納されています
Writedump(CacheGet(&quot;id_1&quot;,&quot;aRegion&quot;));
</cfscript>
<cfscript> //プロパティをもたないキャッシュ領域を作成 rProps={}; CacheRegionNew(&quot;aRegion&quot;,rProps,true); // create object myObj myObj={}; myObj.a=&quot;hello&quot;; myObj.b=&quot;world&quot;; // store myObj in the cache region CachePut(&quot;id_1&quot;,myObj,createTimespan(0,0,30,0),createTimespan(0,0,15,0),&quot;aRegion&quot;); // get object myObj that は aRegion の id_1 に格納されています Writedump(CacheGet(&quot;id_1&quot;,&quot;aRegion&quot;)); </cfscript>
<cfscript>
       //プロパティをもたないキャッシュ領域を作成
       rProps={};
       CacheRegionNew(&quot;aRegion&quot;,rProps,true);
       // create object myObj
       myObj={};
       myObj.a=&quot;hello&quot;;
       myObj.b=&quot;world&quot;;
       // store myObj in the cache region
CachePut(&quot;id_1&quot;,myObj,createTimespan(0,0,30,0),createTimespan(0,0,15,0),&quot;aRegion&quot;);
       // get object myObj that は aRegion の id_1 に格納されています
       Writedump(CacheGet(&quot;id_1&quot;,&quot;aRegion&quot;));
</cfscript>

ヘルプをすばやく簡単に入手

新規ユーザーの場合