Bitrix API

CacheEngineInterface

Table of Contents

Methods

clean()  : void
Cleans (removes) the value from the cache by the key (directory or file).
isAvailable()  : bool
Returns true if cache can be read or written.
isCacheExpired()  : bool
Returns true if the cache file has expired.
read()  : bool
Reads the value from the cache. Returns true if the value exists, not expired, and successfully read.
write()  : void
Writes the value into the cache by the key.

Methods

clean()

Cleans (removes) the value from the cache by the key (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.

isAvailable()

Returns true if cache can be read or written.

public isAvailable() : bool
Return values
bool

isCacheExpired()

Returns true if the cache file has expired.

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

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, 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

write()

Writes the value into the cache by the key.

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