TaggableMultiBackend
class TaggableMultiBackend extends MultiBackend implements TaggableBackendInterface (View source)
A taggable multi backend, falling back to multiple backends if errors occur.
Traits
Abstracts the task of creating a BackendInterface implementation with it's options.
Constants
DATETIME_EXPIRYTIME_UNLIMITED |
|
UNLIMITED_LIFETIME |
|
Properties
protected FrontendInterface | $cache | Reference to the cache frontend which uses this backend |
from AbstractBackend |
protected string | $cacheIdentifier | from AbstractBackend | |
protected string | $identifierPrefix | A prefix to seperate stored by appliaction context and cache |
from AbstractBackend |
protected int | $defaultLifetime | Default lifetime of a cache entry in seconds |
from AbstractBackend |
protected EnvironmentConfiguration | $environmentConfiguration | from AbstractBackend | |
protected | $backendConfigurations | from MultiBackend | |
protected | $backends | from MultiBackend | |
protected | $setInAllBackends | from MultiBackend | |
protected | $debug | from MultiBackend | |
protected | $logErrors | from MultiBackend | |
protected | $removeUnhealthyBackends | from MultiBackend | |
protected | $initialized | from MultiBackend | |
protected | $logger | from MultiBackend | |
protected | $throwableStorage | from MultiBackend |
Methods
Constructs this backend
No description
Sets the default lifetime for this cache backend
Calculates the expiry time by the given lifetime. If no lifetime is specified, the default lifetime is used.
Returns the internally used, prefixed entry identifier for the given public entry identifier.
No description
No description
No description
This setter is used by AbstractBackend::setProperties()
This setter is used by AbstractBackend::setProperties()
This setter is used by AbstractBackend::setProperties()
This setter is used by AbstractBackend::setProperties()
This setter is used by AbstractBackend::setProperties()
No description
No description
No description
Details
__construct(EnvironmentConfiguration $environmentConfiguration = null, array $options = [])
Constructs this backend
protected void
setProperties(array $properties, bool $throwExceptionIfPropertyNotSettable = true)
No description
protected bool
setProperty(string $propertyName, mixed $propertyValue)
No description
void
setCache(FrontendInterface $cache)
Sets a reference to the cache frontend which uses this backend
void
setDefaultLifetime(int|string $defaultLifetime)
Sets the default lifetime for this cache backend
protected DateTime
calculateExpiryTime(int $lifetime = null)
Calculates the expiry time by the given lifetime. If no lifetime is specified, the default lifetime is used.
string
getPrefixedIdentifier(string $entryIdentifier)
Returns the internally used, prefixed entry identifier for the given public entry identifier.
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.
protected BackendInterface
instantiateBackend(string $backendObjectName, array $backendOptions, EnvironmentConfiguration $environmentConfiguration)
No description
protected void
prepareBackends()
No description
protected BackendInterface|null
buildSubBackend(string $backendClassName, array $backendOptions)
No description
void
set(string $entryIdentifier, string $data, array $tags = [], int $lifetime = null)
No description
mixed
get(string $entryIdentifier)
No description
bool
has(string $entryIdentifier)
No description
bool
remove(string $entryIdentifier)
No description
void
flush()
No description
void
collectGarbage()
No description
protected void
setBackendConfigurations(array $backendConfigurations)
This setter is used by AbstractBackend::setProperties()
protected void
setSetInAllBackends(bool $setInAllBackends)
This setter is used by AbstractBackend::setProperties()
protected void
setDebug(bool $debug)
This setter is used by AbstractBackend::setProperties()
void
setRemoveUnhealthyBackends(bool $removeUnhealthyBackends)
This setter is used by AbstractBackend::setProperties()
void
setLogErrors(bool $logErrors)
This setter is used by AbstractBackend::setProperties()
protected void
handleError(Throwable $throwable)
No description
protected void
removeUnhealthyBackend(BackendInterface $unhealthyBackend)
No description
int
flushByTag(string $tag)
No description
int
flushByTags(array $tags)
No description
array
findIdentifiersByTag(string $tag)
No description