CacheGetProperties()

edit

Gets the cache properties for the object cache, the page cache, or both. The information is application-specific.

CacheGetProperties( type=string );

Returns: Array

Argument Description
type
string, optional
edit

define which cache instances information are returned

  • "" or not set - information to all default caches (object,template,resource,query)
  • "object" - information to "Default Object" Cache
  • "template" - information to "Default Template" Cache
  • "query" - information to "Default Query" Cache
  • "resource" - information to "Default Resource" Cache
  • {cache name} - information to a specific cache

Examples

edit
// define a RAM cache as the default object cache
application action="update" caches="#{ trycf: {
	class: 'lucee.runtime.cache.ram.RamCache',
	custom: { timeToIdleSeconds: 3600, timeToLiveSeconds: 3600 },
	default: 'object'
}}#";
// returns an array of structs describing the default cache connections
props = cacheGetProperties();
dump( props );
// pass a type to get properties for a specific default cache
objectProps = cacheGetProperties( "object" );
dump( objectProps );
// or pass a cache name directly
namedProps = cacheGetProperties( "trycf" );
dump( namedProps );

See also