TYPO3  7.6
Public Member Functions | Protected Attributes | List of all members
TransientMemoryBackend Class Reference
Inheritance diagram for TransientMemoryBackend:
AbstractBackend TaggableBackendInterface BackendInterface BackendInterface

Public Member Functions

 set ($entryIdentifier, $data, array $tags=array(), $lifetime=null)
 
 get ($entryIdentifier)
 
 has ($entryIdentifier)
 
 remove ($entryIdentifier)
 
 findIdentifiersByTag ($tag)
 
 flush ()
 
 flushByTag ($tag)
 
 collectGarbage ()
 
- Public Member Functions inherited from AbstractBackend
 __construct ($context, array $options=array())
 
 setCache (\TYPO3\CMS\Core\Cache\Frontend\FrontendInterface $cache)
 
 setDefaultLifetime ($defaultLifetime)
 

Protected Attributes

 $entries = array()
 
 $tagsAndEntries = array()
 
- Protected Attributes inherited from AbstractBackend
 $cache
 
 $cacheIdentifier
 
 $context
 
 $defaultLifetime = 3600
 

Additional Inherited Members

- Public Attributes inherited from AbstractBackend
const DATETIME_EXPIRYTIME_UNLIMITED = '9999-12-31T23:59:59+0000'
 
const UNLIMITED_LIFETIME = 0
 
- Protected Member Functions inherited from AbstractBackend
 calculateExpiryTime ($lifetime=null)
 

Detailed Description

A caching backend which stores cache entries during one script run.

This file is a backport from FLOW3

Definition at line 23 of file TransientMemoryBackend.php.

Member Function Documentation

collectGarbage ( )

Does nothing

Returns
void

Implements BackendInterface.

Definition at line 157 of file TransientMemoryBackend.php.

findIdentifiersByTag (   $tag)

Finds and returns all cache entry identifiers which are tagged by the specified tag.

Parameters
string$tagThe tag to search for
Returns
array An array with identifiers of all matching entries. An empty array if no entries matched

Implements TaggableBackendInterface.

Definition at line 115 of file TransientMemoryBackend.php.

Referenced by TransientMemoryBackend\flushByTag().

flush ( )

Removes all cache entries of this cache.

Returns
void

Implements BackendInterface.

Definition at line 130 of file TransientMemoryBackend.php.

flushByTag (   $tag)

Removes all cache entries of this cache which are tagged by the specified tag.

Parameters
string$tagThe tag the entries must have
Returns
void

Implements TaggableBackendInterface.

Definition at line 143 of file TransientMemoryBackend.php.

References TransientMemoryBackend\findIdentifiersByTag().

get (   $entryIdentifier)

Loads data from the cache.

Parameters
string$entryIdentifierAn identifier which describes the cache entry to load
Returns
mixed The cache entry's content as a string or FALSE if the cache entry could not be loaded

Implements BackendInterface.

Definition at line 68 of file TransientMemoryBackend.php.

has (   $entryIdentifier)

Checks if a cache entry with the specified identifier exists.

Parameters
string$entryIdentifierAn identifier specifying the cache entry
Returns
bool TRUE if such an entry exists, FALSE if not

Implements BackendInterface.

Definition at line 80 of file TransientMemoryBackend.php.

remove (   $entryIdentifier)

Removes all cache entries matching the specified identifier.

Parameters
string$entryIdentifierSpecifies the cache entry to remove
Returns
bool TRUE if the entry could be removed or FALSE if no entry was found

Implements BackendInterface.

Definition at line 92 of file TransientMemoryBackend.php.

set (   $entryIdentifier,
  $data,
array  $tags = array(),
  $lifetime = null 
)

Saves data in the cache.

Parameters
string$entryIdentifierAn identifier for this specific cache entry
string$dataThe data to be stored
array$tagsTags to associate with this cache entry
int$lifetimeLifetime of this cache entry in seconds. If NULL is specified, the default lifetime is used. "0" means unlimited liftime.
Returns
void
Exceptions
\TYPO3\CMS\Core\Cache\Exceptionif no cache frontend has been set.
\TYPO3\CMS\Core\Cache\Exception\InvalidDataException

Implements BackendInterface.

Definition at line 47 of file TransientMemoryBackend.php.

Member Data Documentation

$entries = array()
protected

Definition at line 28 of file TransientMemoryBackend.php.

$tagsAndEntries = array()
protected

Definition at line 33 of file TransientMemoryBackend.php.