1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
Класс CacheEngineFiles
Граф наследования:CacheEngineFiles:
CacheEngineInterface CacheEngineStatInterface

Открытые члены

 __construct ($options=[])
 getReadBytes ()
 getWrittenBytes ()
 getCachePath ()
 isAvailable ()
 clean ($baseDir, $initDir='', $filename='')
 read (&$vars, $baseDir, $initDir, $filename, $ttl)
 write ($vars, $baseDir, $initDir, $filename, $ttl)
 isCacheExpired ($path)
 delayedDelete ()

Защищенные члены

 unlink (string $fileName)
 randomizeFile (string $fileName)
 lock (string $fileName)
 unlock (string $fileName)
 deleteOneDir (int $etime=0, array $path=[])

Защищенные данные

const LOCK_FILE = '/bitrix/cache/cacheCleanJob_lock.php'
int $written = 0
int $read = 0
string $path = ''
bool $useLock = false
string $rootDirectory

Статические защищенные данные

static array $lockHandles = []
static int $clusterGroup = 0

Подробное описание

См. определение в файле cacheenginefiles.php строка 10

Конструктор(ы)

◆ __construct()

__construct ( $options = [])

Engine constructor.

Аргументы
array$optionsCache options.

См. определение в файле cacheenginefiles.php строка 26

Методы

◆ clean()

clean ( $baseDir,
$initDir = '',
$filename = '' )

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

Аргументы
string$baseDirBase cache directory (usually /bitrix/cache).
string$initDirDirectory within base.
string$filenameFile name.
Возвращает
void

Замещает CacheEngineInterface.

См. определение в файле cacheenginefiles.php строка 137

◆ delayedDelete()

delayedDelete ( )

Agent function which deletes marked cache directories.

Возвращает
void

См. определение в файле cacheenginefiles.php строка 489

◆ deleteOneDir()

deleteOneDir ( int $etime = 0,
array $path = [] )
protected

Deletes one cache directory. Works no longer than etime.

Аргументы
integer$etimeTimestamp when to stop working.
array$pathRecord from b_cache_tag.
Возвращает
void

См. определение в файле cacheenginefiles.php строка 432

◆ getCachePath()

getCachePath ( )

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

Возвращает
string

Замещает CacheEngineStatInterface.

См. определение в файле cacheenginefiles.php строка 78

◆ getReadBytes()

getReadBytes ( )

Returns number of bytes read from cache.

Возвращает
integer

Замещает CacheEngineStatInterface.

См. определение в файле cacheenginefiles.php строка 62

◆ getWrittenBytes()

getWrittenBytes ( )

Returns number of bytes written to cache.

Возвращает
integer

Замещает CacheEngineStatInterface.

См. определение в файле cacheenginefiles.php строка 70

◆ isAvailable()

isAvailable ( )

Returns true if cache can be read or written.

Возвращает
bool

Замещает CacheEngineInterface.

См. определение в файле cacheenginefiles.php строка 86

◆ isCacheExpired()

isCacheExpired ( $path)

Returns true if the cache file has expired.

Аргументы
string$pathAbsolute physical path.
Возвращает
boolean

Замещает CacheEngineInterface.

См. определение в файле cacheenginefiles.php строка 393

◆ lock()

lock ( string $fileName)
protected

Tries to put non-blocking exclusive lock on the file. Returns true if file not exists, or lock was successfully got.

Аргументы
string$fileNameAbsolute cache file path.
Возвращает
boolean

См. определение в файле cacheenginefiles.php строка 222

◆ randomizeFile()

randomizeFile ( string $fileName)
protected

Generates very temporary file name by adding some random suffix to the file path. Returns empty string on failure.

Аргументы
string$fileNameFile path within document root.
Возвращает
string

См. определение в файле cacheenginefiles.php строка 120

◆ read()

read ( & $vars,
$baseDir,
$initDir,
$filename,
$ttl )

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

Аргументы
mixed&$varsCached result.
string$baseDirBase cache directory (usually /bitrix/cache).
string$initDirDirectory within base.
string$filenameFile name.
integer$ttlExpiration period in seconds.
Возвращает
boolean

Замещает CacheEngineInterface.

См. определение в файле cacheenginefiles.php строка 250

◆ unlink()

unlink ( string $fileName)
protected

Deletes physical file. Returns true on success.

Аргументы
string$fileNameAbsolute physical path.
Возвращает
void

См. определение в файле cacheenginefiles.php строка 96

◆ unlock()

unlock ( string $fileName)
protected

Releases the lock obtained by lock method.

Аргументы
string$fileNameAbsolute cache file path.
Возвращает
void

См. определение в файле cacheenginefiles.php строка 238

◆ write()

write ( $vars,
$baseDir,
$initDir,
$filename,
$ttl )

Writes the value into the cache by the key.

Аргументы
mixed$varsCached result.
string$baseDirBase cache directory (usually /bitrix/cache).
string$initDirDirectory within base.
string$filenameFile name.
integer$ttlExpiration period in seconds.
Возвращает
void

Замещает CacheEngineInterface.

См. определение в файле cacheenginefiles.php строка 336

Поля

◆ $clusterGroup

int $clusterGroup = 0
staticprotected

См. определение в файле cacheenginefiles.php строка 20

◆ $lockHandles

array $lockHandles = []
staticprotected

См. определение в файле cacheenginefiles.php строка 19

◆ $path

string $path = ''
protected

См. определение в файле cacheenginefiles.php строка 16

◆ $read

int $read = 0
protected

См. определение в файле cacheenginefiles.php строка 15

◆ $rootDirectory

string $rootDirectory
protected

См. определение в файле cacheenginefiles.php строка 18

◆ $useLock

bool $useLock = false
protected

См. определение в файле cacheenginefiles.php строка 17

◆ $written

int $written = 0
protected

См. определение в файле cacheenginefiles.php строка 14

◆ LOCK_FILE

const LOCK_FILE = '/bitrix/cache/cacheCleanJob_lock.php'
protected

См. определение в файле cacheenginefiles.php строка 12


Объявления и описания членов класса находятся в файле: