Bitrix API

CacheEngineRedis extends CacheEngine

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) cache directory or file.
close()  : void
Closes opened connection.
del()  : mixed
delayedDelete()  : void
deleteBySet()  : mixed
delFromSet()  : mixed
get()  : mixed
getCachePath()  : string
Returns physical file path after read or write operation.
getConfig()  : array<string|int, mixed>
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
Returns true if cache has been expired.
read()  : bool
Reads cache from the memcache. Returns true if key value exists, not expired, and successfully read.
set()  : bool
setNotExists()  : mixed
write()  : void
Puts cache into the memcache.

Constants

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.

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
bool

clean()

Cleans (removes) cache directory or file.

public clean(string $baseDir[, string $initDir = false ][, string $filename = false ]) : void
Parameters
$baseDir : string

Base cache directory (usually /bitrix/cache).

$initDir : string = false

Directory within base.

$filename : string = false

File name.

close()

Closes opened connection.

public close() : 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

getCachePath()

Returns physical file path after read or write operation.

public getCachePath() : string
Return values
string

getConfig()

public getConfig() : array<string|int, mixed>
Return values
array<string|int, mixed>

getConnectionName()

public getConnectionName() : string
Return values
string

getReadBytes()

Returns number of bytes read from cache.

public getReadBytes() : int
Return values
int

getSet()

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
Return values
int

isAvailable()

Returns true if cache can be read or written.

public isAvailable() : bool
Return values
bool

isCacheExpired()

Returns true if cache has been expired.

public isCacheExpired(string $path) : bool

Stub function always returns true.

Parameters
$path : string

Absolute physical path.

Return values
bool

read()

Reads cache from the memcache. Returns true if key value exists, not expired, and successfully read.

public read(mixed &$vars, string $baseDir, string $initDir, string $filename, int $ttl) : bool
Parameters
$vars : mixed

Cached result.

$baseDir : string

Base cache directory (usually /bitrix/cache).

$initDir : string

Directory within base.

$filename : string

File name.

$ttl : int

Expiration period in seconds.

Return values
bool

set()

public set(mixed $key, mixed $ttl, mixed $value) : bool
Parameters
$key : mixed
$ttl : mixed
$value : mixed
Return values
bool

setNotExists()

public setNotExists(mixed $key, mixed $ttl, mixed $value) : mixed
Parameters
$key : mixed
$ttl : mixed
$value : mixed

write()

Puts cache into the memcache.

public write(mixed $vars, string $baseDir, string $initDir, string $filename, int $ttl) : void
Parameters
$vars : mixed

Cached result.

$baseDir : string

Base cache directory (usually /bitrix/cache).

$initDir : string

Directory within base.

$filename : string

File name.

$ttl : int

Expiration period in seconds.


        
On this page

Search results