Documentation

Psr16Adapter extends AbstractAdapter
in package
implements PruneableInterface, ResettableInterface Uses ProxyTrait

Turns a PSR-16 cache into a PSR-6 one.

Tags
author

Nicolas Grekas p@tchwork.com

Table of Contents

Interfaces

PruneableInterface
Interface extends psr-6 and psr-16 caches to allow for pruning (deletion) of all expired cache items.
ResettableInterface
Resets a pool's local state.

Properties

$apcuSupported  : mixed
$miss  : object
$phpFilesSupported  : mixed

Methods

__construct()  : mixed
commit()  : bool
{@inheritdoc}
createConnection()  : mixed
createSystemCache()  : AdapterInterface
Returns the best possible adapter that your runtime supports.
doClear()  : bool
{@inheritdoc}
doDelete()  : bool
{@inheritdoc}
doFetch()  : iterable<string|int, mixed>
{@inheritdoc}
doHave()  : bool
{@inheritdoc}
doSave()  : array<string|int, mixed>|bool
{@inheritdoc}

Properties

Methods

__construct()

public __construct(CacheInterface $pool[, string $namespace = '' ][, int $defaultLifetime = 0 ]) : mixed
Parameters
$pool : CacheInterface
$namespace : string = ''
$defaultLifetime : int = 0

createConnection()

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

createSystemCache()

Returns the best possible adapter that your runtime supports.

public static createSystemCache(string $namespace, int $defaultLifetime, string $version, string $directory[, LoggerInterface $logger = null ]) : AdapterInterface

Using ApcuAdapter makes system caches compatible with read-only filesystems.

Parameters
$namespace : string
$defaultLifetime : int
$version : string
$directory : string
$logger : LoggerInterface = null
Return values
AdapterInterface

doClear()

{@inheritdoc}

protected doClear(string $namespace) : bool
Parameters
$namespace : string
Return values
bool

doDelete()

{@inheritdoc}

protected doDelete(array<string|int, mixed> $ids) : bool
Parameters
$ids : array<string|int, mixed>
Return values
bool

doFetch()

{@inheritdoc}

protected doFetch(array<string|int, mixed> $ids) : iterable<string|int, mixed>
Parameters
$ids : array<string|int, mixed>
Return values
iterable<string|int, mixed>

doHave()

{@inheritdoc}

protected doHave(string $id) : bool
Parameters
$id : string
Return values
bool

doSave()

{@inheritdoc}

protected doSave(array<string|int, mixed> $values, int $lifetime) : array<string|int, mixed>|bool
Parameters
$values : array<string|int, mixed>
$lifetime : int
Return values
array<string|int, mixed>|bool

        
On this page

Search results