PHP Интерфейс Neos\Cache\Backend\BackendInterface

Показать файл Открыть проект

Открытые методы

Метод Описание
collectGarbage ( ) : void Does garbage collection
flush ( ) : void Removes all cache entries of this cache.
get ( string $entryIdentifier ) : mixed Loads data from the cache.
getPrefixedIdentifier ( string $entryIdentifier ) : string Returns the internally used, prefixed entry identifier for the given public entry identifier.
has ( string $entryIdentifier ) : boolean Checks if a cache entry with the specified identifier exists.
remove ( string $entryIdentifier ) : boolean Removes all cache entries matching the specified identifier.
set ( string $entryIdentifier, string $data, array $tags = [], integer $lifetime = null ) : void Saves data in the cache.
setCache ( Neos\Cache\Frontend\FrontendInterface $cache ) : void Sets a reference to the cache frontend which uses this backend

Описание методов

collectGarbage() публичный Метод

Does garbage collection
public collectGarbage ( ) : void
Результат void

flush() публичный Метод

Removes all cache entries of this cache.
public flush ( ) : void
Результат void

get() публичный Метод

Loads data from the cache.
public get ( string $entryIdentifier ) : mixed
$entryIdentifier string An identifier which describes the cache entry to load
Результат mixed The cache entry's content as a string or FALSE if the cache entry could not be loaded

getPrefixedIdentifier() публичный Метод

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.
public getPrefixedIdentifier ( string $entryIdentifier ) : string
$entryIdentifier string
Результат string

has() публичный Метод

Checks if a cache entry with the specified identifier exists.
public has ( string $entryIdentifier ) : boolean
$entryIdentifier string An identifier specifying the cache entry
Результат boolean TRUE if such an entry exists, FALSE if not

remove() публичный Метод

Usually this only affects one entry but if - for what reason ever - old entries for the identifier still exist, they are removed as well.
public remove ( string $entryIdentifier ) : boolean
$entryIdentifier string Specifies the cache entry to remove
Результат boolean TRUE if (at least) an entry could be removed or FALSE if no entry was found

set() публичный Метод

Saves data in the cache.
public set ( string $entryIdentifier, string $data, array $tags = [], integer $lifetime = null ) : void
$entryIdentifier string An identifier for this specific cache entry
$data string The data to be stored
$tags array Tags to associate with this cache entry. If the backend does not support tags, this option can be ignored.
$lifetime integer Lifetime of this cache entry in seconds. If NULL is specified, the default lifetime is used. "0" means unlimited lifetime.
Результат void

setCache() публичный Метод

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
Результат void