Documentation

cacheBackend

Cache backend interface

Tags
author

Stefan Seehafer aka imagine fanpress@nobody-knows.org

copyright

(c) 2022, Stefan Seehafer

license

http://www.gnu.org/licenses/gpl.txt GPLv3

Table of Contents

__construct()  : mixed
Konstruktor
cleanup()  : bool
Cleanup cache file
cleanupByCacheName()  : bool
Cleanup cache by cache name in base path
expires()  : mixed|null
Fetch expiration time
getSize()  : int
get cache size
prepareReturnedValue()  : mixed
Prepare data
read()  : mixed|null
Read cache file content
write()  : bool
Write content to cache file

Methods

__construct()

Konstruktor

public __construct(string $cacheName) : mixed
Parameters
$cacheName : string
Return values
mixed

cleanup()

Cleanup cache file

public cleanup() : bool
Return values
bool

cleanupByCacheName()

Cleanup cache by cache name in base path

public static cleanupByCacheName(string $basePath[, type $cacheName = null ]) : bool
Parameters
$basePath : string
$cacheName : type = null
Tags
since
5.1-dev
Return values
bool

expires()

Fetch expiration time

public expires() : mixed|null
Return values
mixed|null

getSize()

get cache size

public getSize(string $basePath) : int
Parameters
$basePath : string
Return values
int

prepareReturnedValue()

Prepare data

public prepareReturnedValue(mixed $value) : mixed
Parameters
$value : mixed
Return values
mixed

read()

Read cache file content

public read([bool $raw = false ]) : mixed|null
Parameters
$raw : bool = false
Return values
mixed|null

write()

Write content to cache file

public write(mixed $data, int $expires) : bool
Parameters
$data : mixed
$expires : int
Return values
bool

Search results