Documentation

FilesystemAdapter extends AbstractAdapter
in package
implements PruneableInterface Uses FilesystemTrait

Interfaces, Classes and Traits

PruneableInterface
Interface extends psr-6 and psr-16 caches to allow for pruning (deletion) of all expired cache items.

Table of Contents

TTL_ONE_YEAR  = 31556926
$apcuSupported  : mixed
$phpFilesSupported  : mixed
__construct()  : mixed
commit()  : bool
{@inheritdoc}
createConnection()  : mixed
createSystemCache()  : AdapterInterface
Returns the best possible adapter that your runtime supports.
init()  : void
Sets up the caching folder with the given namespace.

Constants

Properties

Methods

__construct()

public __construct([string $namespace = 'phpdoc' ][, int $defaultLifetime = self::TTL_ONE_YEAR ]) : mixed
Parameters
$namespace : string = 'phpdoc'
$defaultLifetime : int = self::TTL_ONE_YEAR
Return values
mixed

commit()

{@inheritdoc}

public commit() : bool
Return values
bool

createConnection()

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

createSystemCache()

Returns the best possible adapter that your runtime supports.

public static createSystemCache(string $namespace, int $defaultLifetime, string $version, string $directory[, LoggerInterface|null $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 = null
Return values
AdapterInterface

init()

Sets up the caching folder with the given namespace.

public init(string $namespace, string $directory) : void

With phpDocumentor you can set the caching folder in your configuration; this poses an interesting problem with the default FilesystemAdapter of Symfony as that only allows you to set the caching folder upon instantiation.

Parameters
$namespace : string
$directory : string
Return values
void

Search results