PHP Class Neos\Cache\Backend\TransientMemoryBackend

Inheritance: extends AbstractBackend, implements Neos\Cache\Backend\TaggableBackendInterface
Show file Open project: neos/flow-development-collection Class Usage Examples

Protected Properties

Property Type Description
$entries array
$tagsAndEntries array

Public Methods

Method Description
collectGarbage ( ) : void Does nothing
findIdentifiersByTag ( string $tag ) : array Finds and returns all cache entry identifiers which are tagged by the specified tag.
flush ( ) : void Removes all cache entries of this cache.
flushByTag ( string $tag ) : integer Removes all cache entries of this cache which are tagged by the specified tag.
get ( string $entryIdentifier ) : mixed Loads data from the cache.
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.

Method Details

collectGarbage() public method

Does nothing
public collectGarbage ( ) : void
return void

findIdentifiersByTag() public method

Finds and returns all cache entry identifiers which are tagged by the specified tag.
public findIdentifiersByTag ( string $tag ) : array
$tag string The tag to search for
return array An array with identifiers of all matching entries. An empty array if no entries matched

flush() public method

Removes all cache entries of this cache.
public flush ( ) : void
return void

flushByTag() public method

Removes all cache entries of this cache which are tagged by the specified tag.
public flushByTag ( string $tag ) : integer
$tag string The tag the entries must have
return integer The number of entries which have been affected by this flush

get() public method

Loads data from the cache.
public get ( string $entryIdentifier ) : mixed
$entryIdentifier string An identifier which describes the cache entry to load
return mixed The cache entry's content as a string or FALSE if the cache entry could not be loaded

has() public method

Checks if a cache entry with the specified identifier exists.
public has ( string $entryIdentifier ) : boolean
$entryIdentifier string An identifier specifying the cache entry
return boolean TRUE if such an entry exists, FALSE if not

remove() public method

Removes all cache entries matching the specified identifier.
public remove ( string $entryIdentifier ) : boolean
$entryIdentifier string Specifies the cache entry to remove
return boolean TRUE if the entry could be removed or FALSE if no entry was found

set() public method

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
$lifetime integer Lifetime of this cache entry in seconds. If NULL is specified, the default lifetime is used. "0" means unlimited liftime.
return void

Property Details

$entries protected property

protected array $entries
return array

$tagsAndEntries protected property

protected array $tagsAndEntries
return array