Bitrix API

CacheEngineFiles implements CacheEngineInterface, CacheEngineStatInterface

Table of Contents

Interfaces

CacheEngineInterface
CacheEngineStatInterface

Methods

__construct()  : mixed
Engine constructor.
clean()  : void
Cleans (removes) the value from the cache by the key (directory or file).
delayedDelete()  : void
Agent function which deletes marked cache directories.
getCachePath()  : string
Returns the cache key (path) after read or write operation.
getReadBytes()  : int
Returns number of bytes read from cache.
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 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

__construct()

Engine constructor.

public __construct([array<string|int, mixed> $options = [] ]) : mixed
Parameters
$options : array<string|int, mixed> = []

Cache options.

clean()

Cleans (removes) the value from the cache by the key (directory or file).

public clean(mixed $baseDir[, mixed $initDir = '' ][, mixed $filename = '' ]) : void
Parameters
$baseDir : mixed

Base cache directory (usually /bitrix/cache).

$initDir : mixed = ''

Directory within base.

$filename : mixed = ''

File name.

Tags
inheritdoc

delayedDelete()

Agent function which deletes marked cache directories.

public delayedDelete() : void

getCachePath()

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

public getCachePath() : string
Tags
inheritdoc
Return values
string

getReadBytes()

Returns number of bytes read from cache.

public getReadBytes() : int
Tags
inheritdoc
Return values
int

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()

Returns true if the cache file has expired.

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

Absolute physical path.

Tags
inheritdoc
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

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