NullBackend
class NullBackend extends AbstractBackend implements PhpCapableBackendInterface, TaggableBackendInterface (View source)
A caching backend which forgets everything immediately
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 |
Methods
Constructs this backend
No description
Successfully ignore every configured property
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.
Acts as if it would save data
Returns False
Returns False
Does nothing
Returns an empty array
Does nothing
Does nothing
Does nothing
Does nothing
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)
Successfully ignore every configured property
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.
void
set(string $entryIdentifier, string $data, array $tags = [], int $lifetime = null)
Acts as if it would save data
mixed
get(string $entryIdentifier)
Returns False
bool
has(string $entryIdentifier)
Returns False
bool
remove(string $entryIdentifier)
Does nothing
array
findIdentifiersByTag(string $tag)
Returns an empty array
void
flush()
Does nothing
int
flushByTag(string $tag)
Does nothing
void
collectGarbage()
Does nothing
mixed
requireOnce(string $identifier)
Does nothing