CacheEngineMemcached extends CacheEngineMemcache
Table of Contents
Constants
- BX_BASE_LIST = 'BL:'
- BX_INIT_DIR_LIST = 'IL:'
Methods
- __construct() : mixed
- CacheEngine constructor.
- addCleanPath() : void
- addToSet() : mixed
- checkInSet() : bool
- clean() : void
- Cleans (removes) the value from the cache by the key (directory or file).
- close() : void
- Closes opened connection.
- del() : mixed
- delayedDelete() : void
- deleteBySet() : mixed
- delFromSet() : mixed
- get() : mixed
- getCachePath() : string
- Returns the cache key (path) after read or write operation.
- getConnectionClass() : mixed
- getConnectionName() : string
- getReadBytes() : int
- Returns number of bytes read from cache.
- getSet() : array<string|int, mixed>
- getWrittenBytes() : int
- Returns number of bytes written to cache.
- isAvailable() : bool
- Returns true if cache can be read or written.
- isCacheExpired() : bool
- Stub function, always returns false.
- read() : bool
- Reads the value from the cache. Returns true if the value exists, not expired, and successfully read.
- set() : bool
- setNotExists() : mixed
- write() : void
- Writes the value into the cache by the key.
Constants
BX_BASE_LIST
public
mixed
BX_BASE_LIST
= 'BL:'
BX_INIT_DIR_LIST
public
mixed
BX_INIT_DIR_LIST
= 'IL:'
Methods
__construct()
CacheEngine constructor.
public
__construct([array<string|int, mixed> $options = [] ]) : mixed
Parameters
- $options : array<string|int, mixed> = []
-
Cache options.
addCleanPath()
public
addCleanPath(array<string|int, mixed> $data) : void
Parameters
- $data : array<string|int, mixed>
addToSet()
public
addToSet(mixed $key, mixed $value) : mixed
Parameters
- $key : mixed
- $value : mixed
checkInSet()
public
checkInSet(mixed $key, mixed $value) : bool
Parameters
- $key : mixed
- $value : mixed
Return values
boolclean()
Cleans (removes) the value from the cache by the key (directory or file).
public
clean(mixed $baseDir[, mixed $initDir = false ][, mixed $filename = false ]) : void
Parameters
- $baseDir : mixed
-
Base cache directory (usually /bitrix/cache).
- $initDir : mixed = false
-
Directory within base.
- $filename : mixed = false
-
File name.
Tags
close()
Closes opened connection.
public
close() : void
del()
public
del(mixed $key) : mixed
Parameters
- $key : mixed
delayedDelete()
public
delayedDelete() : void
deleteBySet()
public
deleteBySet(mixed $key[, mixed $prefix = '' ]) : mixed
Parameters
- $key : mixed
- $prefix : mixed = ''
delFromSet()
public
delFromSet(mixed $key, mixed $member) : mixed
Parameters
- $key : mixed
- $member : mixed
get()
public
get(mixed $key) : mixed
Parameters
- $key : mixed
getCachePath()
Returns the cache key (path) after read or write operation.
public
getCachePath() : string
Tags
Return values
stringgetConnectionClass()
public
static getConnectionClass() : mixed
getConnectionName()
public
getConnectionName() : string
Return values
stringgetReadBytes()
Returns number of bytes read from cache.
public
getReadBytes() : int
Tags
Return values
intgetSet()
public
getSet(mixed $key) : array<string|int, mixed>
Parameters
- $key : mixed
Return values
array<string|int, mixed>getWrittenBytes()
Returns number of bytes written to cache.
public
getWrittenBytes() : int
Tags
Return values
intisAvailable()
Returns true if cache can be read or written.
public
isAvailable() : bool
Tags
Return values
boolisCacheExpired()
Stub function, always returns false.
public
isCacheExpired(mixed $path) : bool
Parameters
- $path : mixed
-
Absolute physical path.
Return values
boolread()
Reads the value from the cache. Returns true if the value exists, not expired, and successfully read.
public
read(mixed &$vars, mixed $baseDir, mixed $initDir, mixed $filename, mixed $ttl) : bool
Parameters
- $vars : mixed
-
Cached result.
- $baseDir : mixed
-
Base cache directory (usually /bitrix/cache).
- $initDir : mixed
-
Directory within base.
- $filename : mixed
-
File name.
- $ttl : mixed
-
Expiration period in seconds.
Tags
Return values
boolset()
public
set(mixed $key, mixed $ttl, mixed $value) : bool
Parameters
- $key : mixed
- $ttl : mixed
- $value : mixed
Return values
boolsetNotExists()
public
setNotExists(mixed $key, mixed $ttl, mixed $value) : mixed
Parameters
- $key : mixed
- $ttl : mixed
- $value : mixed
write()
Writes the value into the cache by the key.
public
write(mixed $vars, mixed $baseDir, mixed $initDir, mixed $filename, mixed $ttl) : void
Parameters
- $vars : mixed
-
Cached result.
- $baseDir : mixed
-
Base cache directory (usually /bitrix/cache).
- $initDir : mixed
-
Directory within base.
- $filename : mixed
-
File name.
- $ttl : mixed
-
Expiration period in seconds.