PhpFilesAdapter
extends AbstractAdapter
in package
implements
PruneableInterface
Uses
FilesystemCommonTrait
Tags
Table of Contents
Interfaces
- PruneableInterface
- Interface extends psr-6 and psr-16 caches to allow for pruning (deletion) of all expired cache items.
Properties
- $apcuSupported : mixed
- $appendOnly : bool
- $files : array<string|int, mixed>
- $includeHandler : Closure
- $phpFilesSupported : mixed
- $startTime : int
- $values : array<string|int, mixed>
- $valuesCache : array<string|int, mixed>
Methods
- __construct() : mixed
- commit() : bool
- {@inheritdoc}
- createConnection() : mixed
- createSystemCache() : AdapterInterface
- Returns the best possible adapter that your runtime supports.
- isSupported() : mixed
- prune() : bool
- doClear() : bool
- {@inheritdoc}
- doDelete() : bool
- {@inheritdoc}
- doFetch() : iterable<string|int, mixed>
- {@inheritdoc}
- doHave() : bool
- {@inheritdoc}
- doSave() : array<string|int, mixed>|bool
- {@inheritdoc}
- doUnlink() : mixed
- getFileKey() : string
Properties
$apcuSupported
private
static mixed
$apcuSupported
$appendOnly
private
bool
$appendOnly
$files
private
array<string|int, mixed>
$files
= []
$includeHandler
private
Closure
$includeHandler
$phpFilesSupported
private
static mixed
$phpFilesSupported
$startTime
private
static int
$startTime
$values
private
array<string|int, mixed>
$values
= []
$valuesCache
private
static array<string|int, mixed>
$valuesCache
= []
Methods
__construct()
public
__construct([string $namespace = '' ][, int $defaultLifetime = 0 ][, string $directory = null ][, $appendOnly = false ]) : mixed
Parameters
- $namespace : string = ''
- $defaultLifetime : int = 0
- $directory : string = null
- $appendOnly : = false
-
Set to
true
to gain extra performance when the items stored in this pool never expire. Doing so is encouraged because it fits perfectly OPcache's memory model.
Tags
commit()
{@inheritdoc}
public
commit() : bool
Return values
boolcreateConnection()
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
AdapterInterfaceisSupported()
public
static isSupported() : mixed
prune()
public
prune() : bool
Return values
booldoClear()
{@inheritdoc}
protected
doClear(string $namespace) : bool
Parameters
- $namespace : string
Return values
booldoDelete()
{@inheritdoc}
protected
doDelete(array<string|int, mixed> $ids) : bool
Parameters
- $ids : array<string|int, mixed>
Return values
booldoFetch()
{@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
booldoSave()
{@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>|booldoUnlink()
protected
doUnlink(string $file) : mixed
Parameters
- $file : string
getFileKey()
private
getFileKey(string $file) : string
Parameters
- $file : string