Свойство | Тип | Описание | |
---|---|---|---|
$trace | boolean | ||
$trackGet | array | ||
$trackGets | integer | ||
$trackSet | array | ||
$trackSets | integer | ||
$trackTime | integer |
Свойство | Тип | Описание | |
---|---|---|---|
$cacheType | Type of cache this this: one of CACHE_TYPE_MEMORY, CACHE_TYPE_FILE, CACHE_TYPE_NULL. | ||
$containers | List of cache containers. | ||
$features | List of features this cache system supports. | ||
$localCache | Local in-memory cache of fetched data. This prevents duplicate gets to memcache. | ||
$stores | Memory copy of store containers. |
Метод | Описание | |
---|---|---|
__construct ( ) | ||
activeCache ( ) : string | Gets the short name of the currently active cache. | |
activeEnabled ( type $ForceEnable = false ) : boolean | Get the status of the active cache. | |
activeStore ( type $ForceMethod = null ) : mixed | Returns the storage data for the active cache. | |
add ( string $Key, mixed $Value, array $Options = [] ) : boolean | Add a value to the cache. | |
addContainer ( array $Options ) : boolean | Add a container to the cache pool. | |
config ( $Key = null, $Default = null ) | * Get the value of a store-specific config | |
decrement ( string $Key, integer $Amount = 1, $Options = [] ) : integer | Decrement the value of the provided key by {@link $Amount}. | |
exists ( string $Key ) : array | Check if a value exists in the cache. | |
fail ( string $server ) | Register a temporary server connection failure. | |
flush ( ) : boolean | Invalidate all items in the cache. | |
get ( string $Key, array $Options = [] ) : mixed | Retrieve a key's value from the cache. | |
getPrefix ( $ForcePrefix = null, $WithRevision = true ) | ||
getRevision ( $ForcePrefix = null, $Force = false ) | ||
hasFeature ( integer $Feature ) : mixed | Check whether this cache supports the specified feature. | |
increment ( string $Key, integer $Amount = 1, $Options = [] ) : integer | Increment the value of the provided key by {@link $Amount}. | |
incrementRevision ( ) | ||
initialize ( $ForceEnable = false, $ForceMethod = false ) : Gdn_Cache | Determines the currently installed cache solution and returns a fresh instance of its object. | |
makeKey ( $Key, $Options ) | ||
online ( ) : boolean | Is the current cache available? | |
option ( $Option = null, $Default = null ) | * Get the value of a store-specific option. | |
registerFeature ( integer $Feature, mixed $Meta = true ) | Flag this cache as being capable of performing a feature. | |
remove ( string $Key, array $Options = [] ) : boolean | Remove a key/value pair from the cache. | |
replace ( string $Key, mixed $Value, array $Options = [] ) : boolean | Replace an existing key's value with the provided value. | |
store ( string $Key, mixed $Value, array $Options = [] ) : boolean | Store a value in the cache. | |
stripKey ( $Key, $Options ) | ||
trace ( $trace = null ) | ||
type ( ) : string | Returns a constant describing the type of cache implementation this object represents. | |
unregisterFeature ( integer $Feature ) | Remove feature flag from this cache, for the specific feature. |
Метод | Описание | |
---|---|---|
failure ( $Message ) | ||
fallback ( string $Key, array $Options ) : mixed | ||
localClear ( ) | Clear local cache (process memory cache). | |
localGet ( $key ) | ||
localSet ( $key, $value = null ) |
public static activeCache ( ) : string | ||
Результат | string | shortname of current auto active cache |
public static activeEnabled ( type $ForceEnable = false ) : boolean | ||
$ForceEnable | type | |
Результат | boolean | status of active cache |
public static activeStore ( type $ForceMethod = null ) : mixed | ||
$ForceMethod | type | |
Результат | mixed | Active Store Location |
abstract public addContainer ( array $Options ) : boolean | ||
$Options | array | An array of options with container constants as keys. - CONTAINER_LOCATION: required. the location of the container. SERVER:IP, Filepath, etc. - CONTAINER_PERSISTENT: optional (default true). whether to use connect() or pconnect() where applicable. - CONTAINER_WEIGHT: optional (default 1). number of buckets to create for this server which in turn control its probability of it being selected. - CONTAINER_RETRYINT: optional (default 15s). controls how often a failed container will be retried, the default value is 15 seconds. - CONTAINER_TIMEOUT: optional (default 1s). amount of time to wait for connection to container before timing out. - CONTAINER_CALLBACK: optional (default null). callback to execute if container fails to open/connect. |
Результат | boolean | true on success or false on failure. |
public config ( $Key = null, $Default = null ) | ||
$Key | The config key to retrieve |
public hasFeature ( integer $Feature ) : mixed | ||
$Feature | integer | One of the feature constants. |
Результат | mixed | $Meta returns the meta data supplied during RegisterFeature(). |
public static initialize ( $ForceEnable = false, $ForceMethod = false ) : Gdn_Cache | ||
Результат | Gdn_Cache |
protected static localClear ( ) |
public option ( $Option = null, $Default = null ) | ||
$Option | The option key to retrieve |
public registerFeature ( integer $Feature, mixed $Meta = true ) | ||
$Feature | integer | One of the feature constants. |
$Meta | mixed | An optional data to return when calling HasFeature. default true. |
abstract public store ( string $Key, mixed $Value, array $Options = [] ) : boolean | ||
$Key | string | Cache key used for storage. |
$Value | mixed | Value to be cached. |
$Options | array | An array of cache feature constants. - FEATURE_COMPRESS: Allows items to be internally compressed/decompressed (bool). - FEATURE_EXPIRY: Allows items to autoexpire (seconds). - FEATURE_NOPREFIX: Allows disabling usage of key prefix (bool). - FEATURE_FORCEPREFIX: Allows forcing alternate key prefix (string). - FEATURE_FALLBACK: Allows querying DB for missing keys, or firing a callback (see Gdn_Cache->Fallback). |
Результат | boolean | true on success or false on failure. |
public unregisterFeature ( integer $Feature ) | ||
$Feature | integer | One of the feature constants. |
protected $cacheType |
protected static $localCache |