Bitrix API

KeyValueEngine implements CacheEngineInterface, CacheEngineStatInterface

AbstractYes

Table of Contents

Interfaces

CacheEngineInterface
CacheEngineStatInterface

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()  : mixed
setNotExists()  : mixed
write()  : void
Writes the value into the cache by the key.

Constants

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 abstract addToSet(mixed $key, mixed $value) : mixed
Parameters
$key : mixed
$value : mixed

checkInSet()

public abstract checkInSet(mixed $key, mixed $value) : bool
Parameters
$key : mixed
$value : mixed
Return values
bool

clean()

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
inheritdoc

del()

public abstract del(mixed $key) : mixed
Parameters
$key : mixed

deleteBySet()

public abstract deleteBySet(mixed $key[, mixed $prefix = '' ]) : mixed
Parameters
$key : mixed
$prefix : mixed = ''

delFromSet()

public abstract delFromSet(mixed $key, mixed $member) : mixed
Parameters
$key : mixed
$member : mixed

get()

public abstract get(mixed $key) : mixed
Parameters
$key : mixed

getCachePath()

Returns the cache key (path) after read or write operation.

public getCachePath() : string
Tags
inheritdoc
Return values
string

getConnectionClass()

public abstract static getConnectionClass() : mixed

getConnectionName()

public abstract getConnectionName() : string
Return values
string

getReadBytes()

Returns number of bytes read from cache.

public getReadBytes() : int
Tags
inheritdoc
Return values
int

getSet()

public abstract 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
inheritdoc
Return values
int

isAvailable()

Returns true if cache can be read or written.

public isAvailable() : bool
Tags
inheritdoc
Return values
bool

isCacheExpired()

Stub function, always returns false.

public isCacheExpired(mixed $path) : bool
Parameters
$path : mixed

Absolute physical path.

Return values
bool

read()

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
inheritdoc
Return values
bool

set()

public abstract set(mixed $key, mixed $ttl, mixed $value) : mixed
Parameters
$key : mixed
$ttl : mixed
$value : mixed

setNotExists()

public abstract 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.

Tags
inheritdoc

        
On this page

Search results