PHP Class Neos\Cache\Backend\AbstractBackend

Inheritance: implements Neos\Cache\Backend\BackendInterface
Afficher le fichier Open project: neos/flow-development-collection Class Usage Examples

Protected Properties

Свойство Type Description
$cache Neos\Cache\Frontend\FrontendInterface Reference to the cache frontend which uses this backend
$cacheIdentifier string
$defaultLifetime integer Default lifetime of a cache entry in seconds
$environmentConfiguration Neos\Cache\EnvironmentConfiguration

Méthodes publiques

Méthode Description
__construct ( EnvironmentConfiguration $environmentConfiguration = null, array $options = [] ) Constructs this backend
getPrefixedIdentifier ( string $entryIdentifier ) : string Returns the internally used, prefixed entry identifier for the given public entry identifier.
setCache ( Neos\Cache\Frontend\FrontendInterface $cache ) : void Sets a reference to the cache frontend which uses this backend
setDefaultLifetime ( integer $defaultLifetime ) : void Sets the default lifetime for this cache backend

Méthodes protégées

Méthode Description
calculateExpiryTime ( integer $lifetime = null ) : DateTime Calculates the expiry time by the given lifetime. If no lifetime is specified, the default lifetime is used.
setProperties ( array $properties, boolean $throwExceptionIfPropertyNotSettable = true ) : void
setProperty ( string $propertyName, mixed $propertyValue ) : boolean

Method Details

__construct() public méthode

Constructs this backend
public __construct ( EnvironmentConfiguration $environmentConfiguration = null, array $options = [] )
$environmentConfiguration Neos\Cache\EnvironmentConfiguration
$options array Configuration options - depends on the actual backend

calculateExpiryTime() protected méthode

Calculates the expiry time by the given lifetime. If no lifetime is specified, the default lifetime is used.
protected calculateExpiryTime ( integer $lifetime = null ) : DateTime
$lifetime integer The lifetime in seconds
Résultat DateTime The expiry time

getPrefixedIdentifier() public méthode

While Flow applications will mostly refer to the simple entry identifier, it may be necessary to know the actual identifier used by the cache backend in order to share cache entries with other applications. This method allows for retrieving it. Note that, in case of the AbstractBackend, this method is returns just the given entry identifier.
public getPrefixedIdentifier ( string $entryIdentifier ) : string
$entryIdentifier string The short entry identifier, for example "NumberOfPostedArticles"
Résultat string The prefixed identifier, for example "Flow694a5c7a43a4_NumberOfPostedArticles"

setCache() public méthode

Sets a reference to the cache frontend which uses this backend
public setCache ( Neos\Cache\Frontend\FrontendInterface $cache ) : void
$cache Neos\Cache\Frontend\FrontendInterface The frontend for this backend
Résultat void

setDefaultLifetime() public méthode

Sets the default lifetime for this cache backend
public setDefaultLifetime ( integer $defaultLifetime ) : void
$defaultLifetime integer Default lifetime of this cache backend in seconds. If NULL is specified, the default lifetime is used. "0" means unlimited liftime.
Résultat void

setProperties() protected méthode

protected setProperties ( array $properties, boolean $throwExceptionIfPropertyNotSettable = true ) : void
$properties array
$throwExceptionIfPropertyNotSettable boolean
Résultat void

setProperty() protected méthode

protected setProperty ( string $propertyName, mixed $propertyValue ) : boolean
$propertyName string
$propertyValue mixed
Résultat boolean

Property Details

$cache protected_oe property

Reference to the cache frontend which uses this backend
protected FrontendInterface,Neos\Cache\Frontend $cache
Résultat Neos\Cache\Frontend\FrontendInterface

$cacheIdentifier protected_oe property

protected string $cacheIdentifier
Résultat string

$defaultLifetime protected_oe property

Default lifetime of a cache entry in seconds
protected int $defaultLifetime
Résultat integer

$environmentConfiguration protected_oe property

protected EnvironmentConfiguration,Neos\Cache $environmentConfiguration
Résultat Neos\Cache\EnvironmentConfiguration