CacheGet

Description

Gets an object that is stored in the cache.

Returns

The object stored in the cache.

Category

Cache functions

Function syntax

CacheGet(id, [cacheName])

See also

cfcacheCachePutCacheGetAllIdsCacheGetMetadataCacheGetPropertiesCacheRemoveCacheSetProperties

History

ColdFusion (2018 release): Renamed parameter cacheRegion to cacheName.

ColdFusion 10: Added the region parameter.

ColdFusion 9: Added the function.

Parameters

Parameter

Description

id

The ID value assigned to the cache object when it was created.

cacheName

(Optional) Specifies the cache where you can place the cache object.

Example

<cfscript>
       //create a cache region with no properties
       rProps={};
       CacheRegionNew("aRegion",rProps,true);
       // create object myObj
       myObj={};
       myObj.a="hello";
       myObj.b="world";
       // store myObj in the cache region
CachePut("id_1",myObj,createTimespan(0,0,30,0),createTimespan(0,0,15,0),"aRegion");
       // get object myObj that is stored in id_1 in aRegion
       Writedump(CacheGet("id_1","aRegion"));
</cfscript>

 Adobe

Schneller und einfacher Hilfe erhalten

Neuer Benutzer?

Adobe MAX 2024

Adobe MAX
Die Konferenz für Kreative

14. bis 16. Oktober in Miami Beach und online

Adobe MAX

Die Konferenz für Kreative

14. bis 16. Oktober in Miami Beach und online

Adobe MAX 2024

Adobe MAX
Die Konferenz für Kreative

14. bis 16. Oktober in Miami Beach und online

Adobe MAX

Die Konferenz für Kreative

14. bis 16. Oktober in Miami Beach und online