These are options specific to the Filesystem adapter

package Default
inherited_from \Zend\Cache\Storage\Adapter\AdapterOptions

 Methods

Constructor

__construct(array|\Traversable|null $options = null) : \Zend\Cache\Storage\Adapter\FilesystemOptions

Parameters

$options

array\Traversablenull

Exceptions

\Zend\Cache\Exception\InvalidArgumentException

Returns

\Zend\Cache\Storage\Adapter\FilesystemOptions

Constructor

__construct(array|\Traversable|null $options = null
Inherited

Parameters

$options

array\Traversablenull

Get a configuration property

__get(string $key) : mixed
Inherited
see
inherited_from \Zend\Stdlib\ParameterObjectInterface::__get()

Parameters

$key

string

Exceptions

\Zend\Stdlib\Exception\BadMethodCallException

Returns

mixed

Test if a configuration property is null

__isset(string $key) : boolean
Inherited
see
inherited_from \Zend\Stdlib\ParameterObjectInterface::__isset()

Parameters

$key

string

Returns

boolean

Set a configuration property

__set(string $key, mixed $value) : void
Inherited
see
inherited_from \Zend\Stdlib\ParameterObjectInterface::__set()

Parameters

$key

string

$value

mixed

Exceptions

\Zend\Stdlib\Exception\BadMethodCallException

Set a configuration property to NULL

__unset(string $key) : void
Inherited
see
inherited_from \Zend\Stdlib\ParameterObjectInterface::__unset()

Parameters

$key

string

Exceptions

\Zend\Stdlib\Exception\InvalidArgumentException

Get cache dir

getCacheDir() : null | string

Returns

nullstring

Get clear stat cache

getClearStatCache() : boolean

Returns

boolean

Get dir level

getDirLevel() : integer

Returns

integer

Get permission to create directories on unix systems

getDirPermission() : false | integer

Returns

falseinteger

Get file locking

getFileLocking() : boolean

Returns

boolean

Get permission to create files on unix systems

getFilePermission() : false | integer

Returns

falseinteger

Get key pattern

getKeyPattern() : string
Inherited

Returns

string

Get namespace

getNamespace() : string
Inherited

Returns

string

Get namespace separator

getNamespaceSeparator() : string

Returns

string

Get no atime

getNoAtime() : boolean

Returns

boolean

Get no ctime

getNoCtime() : boolean

Returns

boolean

If reading data from cache enabled.

getReadable() : boolean
Inherited

Returns

boolean

Get time to live.

getTtl() : float
Inherited

Returns

float

Get the umask to create files and directories on unix systems

getUmask() : false | integer

Returns

falseinteger

If writing data to cache enabled.

getWritable() : boolean
Inherited

Returns

boolean

Adapter using this instance

setAdapter(\Zend\Cache\Storage\StorageInterface|null $adapter = null) : \Zend\Cache\Storage\Adapter\AdapterOptions
Inherited

Parameters

$adapter

\Zend\Cache\Storage\StorageInterfacenull

Returns

\Zend\Cache\Storage\Adapter\AdapterOptions

Set cache dir

setCacheDir(string $cacheDir) : \Zend\Cache\Storage\Adapter\FilesystemOptions

Parameters

$cacheDir

string

Exceptions

\Zend\Cache\Exception\InvalidArgumentException

Returns

\Zend\Cache\Storage\Adapter\FilesystemOptions

Set clear stat cache

setClearStatCache(boolean $clearStatCache) : \Zend\Cache\Storage\Adapter\FilesystemOptions

Parameters

$clearStatCache

boolean

Returns

\Zend\Cache\Storage\Adapter\FilesystemOptions

Set dir level

setDirLevel(integer $dirLevel) : \Zend\Cache\Storage\Adapter\FilesystemOptions

Parameters

$dirLevel

integer

Exceptions

\Zend\Cache\Exception\InvalidArgumentException

Returns

\Zend\Cache\Storage\Adapter\FilesystemOptions

Set permission to create directories on unix systems

setDirPermission(false|string|integer $dirPermission) : \Zend\Cache\Storage\Adapter\FilesystemOptions
see
see
link http://php.net/manual/function.chmod.php

Parameters

$dirPermission

falsestringinteger

FALSE to disable explicit permission or an octal number

Returns

\Zend\Cache\Storage\Adapter\FilesystemOptions

Set file locking

setFileLocking(boolean $fileLocking) : \Zend\Cache\Storage\Adapter\FilesystemOptions

Parameters

$fileLocking

boolean

Returns

\Zend\Cache\Storage\Adapter\FilesystemOptions

Set permission to create files on unix systems

setFilePermission(false|string|integer $filePermission) : \Zend\Cache\Storage\Adapter\FilesystemOptions
see
see
link http://php.net/manual/function.chmod.php

Parameters

$filePermission

falsestringinteger

FALSE to disable explicit permission or an octal number

Returns

\Zend\Cache\Storage\Adapter\FilesystemOptions

Set one or more configuration properties

setFromArray(array|\Traversable|\Zend\Stdlib\AbstractOptions $options) : \Zend\Stdlib\AbstractOptions
Inherited

Parameters

$options

array\Traversable\Zend\Stdlib\AbstractOptions

Exceptions

\Zend\Stdlib\Exception\InvalidArgumentException

Returns

\Zend\Stdlib\AbstractOptionsProvides fluent interface

Set key pattern

setKeyPattern(null|string $keyPattern) : \Zend\Cache\Storage\Adapter\AdapterOptions
Inherited

Parameters

$keyPattern

nullstring

Exceptions

\Zend\Cache\Exception\InvalidArgumentException

Returns

\Zend\Cache\Storage\Adapter\AdapterOptions

Set namespace.

setNamespace(string $namespace) : \Zend\Cache\Storage\Adapter\AdapterOptions
Inherited

Parameters

$namespace

string

Returns

\Zend\Cache\Storage\Adapter\AdapterOptions

Set namespace separator

setNamespaceSeparator(string $namespaceSeparator) : \Zend\Cache\Storage\Adapter\FilesystemOptions

Parameters

$namespaceSeparator

string

Returns

\Zend\Cache\Storage\Adapter\FilesystemOptions

Set no atime

setNoAtime(boolean $noAtime) : \Zend\Cache\Storage\Adapter\FilesystemOptions

Parameters

$noAtime

boolean

Returns

\Zend\Cache\Storage\Adapter\FilesystemOptions

Set no ctime

setNoCtime(boolean $noCtime) : \Zend\Cache\Storage\Adapter\FilesystemOptions

Parameters

$noCtime

boolean

Returns

\Zend\Cache\Storage\Adapter\FilesystemOptions

Enable/Disable reading data from cache.

setReadable(boolean $readable) : \Zend\Cache\Storage\Adapter\AbstractAdapter
Inherited

Parameters

$readable

boolean

Returns

\Zend\Cache\Storage\Adapter\AbstractAdapter

Set time to live.

setTtl(integer|float $ttl) : \Zend\Cache\Storage\Adapter\AdapterOptions
Inherited

Parameters

$ttl

integerfloat

Returns

\Zend\Cache\Storage\Adapter\AdapterOptions

Set the umask to create files and directories on unix systems

setUmask(false|string|integer $umask) : \Zend\Cache\Storage\Adapter\FilesystemOptions

Note: On multithreaded webservers it's better to explicit set file and dir permission.

see
see
link http://php.net/manual/function.umask.php
link http://en.wikipedia.org/wiki/Umask

Parameters

$umask

falsestringinteger

FALSE to disable umask or an octal number

Returns

\Zend\Cache\Storage\Adapter\FilesystemOptions

Enable/Disable writing data to cache.

setWritable(boolean $writable) : \Zend\Cache\Storage\Adapter\AdapterOptions
Inherited

Parameters

$writable

boolean

Returns

\Zend\Cache\Storage\Adapter\AdapterOptions

Cast to array

toArray() : array
Inherited

Returns

array

Validates and normalize a TTL.

normalizeTtl(integer|float $ttl) : void
Inherited

Parameters

$ttl

integerfloat

Exceptions

\Zend\Cache\Exception\InvalidArgumentException

Triggers an option event if this options instance has a connection to an adapter implements EventsCapableInterface.

triggerOptionEvent(string $optionName, mixed $optionValue) : void
Inherited

Parameters

$optionName

string

$optionValue

mixed

 Properties

 

We use the __ prefix to avoid collisions with properties in user-implementations.

$__strictMode__ : boolean

Default

true
 

The adapter using these options

$adapter : null | \Zend\Cache\Storage\StorageInterface

Default

 

Directory to store cache files

$cacheDir : null | string

Default

null
 

Call clearstatcache enabled?

$clearStatCache : boolean

Default

true
 

How much sub-directaries should be created?

$dirLevel : integer

Default

1
 

Permission creating new directories

$dirPermission : false | integer

Default

448
 

Lock files on writing

$fileLocking : boolean

Default

true
 

Permission creating new files

$filePermission : false | integer

Default

384
 

Overwrite default key pattern

$keyPattern : string

Default

'/^[a-z0-9_\+\-]*$/Di'

Defined in AdapterOptions

inherited_from \Zend\Cache\Storage\Adapter\AdapterOptions::keyPattern
 

Validate key against pattern

$keyPattern : string

Default

''
 

Namespace option

$namespace : string

Default

'zfcache'
 

Namespace separator

$namespaceSeparator : string

Default

'-'
 

Don't get 'fileatime' as 'atime' on metadata

$noAtime : boolean

Default

true
 

Don't get 'filectime' as 'ctime' on metadata

$noCtime : boolean

Default

true
 

Readable option

$readable : boolean

Default

true
 

TTL option

$ttl : integer | float

Default

0
 

Umask to create files and directories

$umask : false | integer

Default

false
 

Writable option

$writable : boolean

Default

true