‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Cache\Backend\TransientMemoryBackend Class Reference
Inheritance diagram for TYPO3\CMS\Core\Cache\Backend\TransientMemoryBackend:
TYPO3\CMS\Core\Cache\Backend\AbstractBackend TYPO3\CMS\Core\Cache\Backend\TaggableBackendInterface TYPO3\CMS\Core\Cache\Backend\TransientBackendInterface TYPO3\CMS\Core\Cache\Backend\BackendInterface TYPO3\CMS\Core\Cache\Backend\BackendInterface TYPO3\CMS\Core\Cache\Backend\BackendInterface

Public Member Functions

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

Protected Attributes

array $entries = array( )
 
array $tagsAndEntries = array( )
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Core\Cache\Backend\AbstractBackend
FrontendInterface $cache
 
string $cacheIdentifier
 
string $context
 
int $defaultLifetime = 3600
 

Additional Inherited Members

- ‪Public Attributes inherited from ‪TYPO3\CMS\Core\Cache\Backend\AbstractBackend
const DATETIME_EXPIRYTIME_UNLIMITED = '9999-12-31T23:59:59+0000'
 
const UNLIMITED_LIFETIME = 0
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Core\Cache\Backend\AbstractBackend
DateTime calculateExpiryTime ($lifetime=null)
 

Detailed Description

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

Definition at line 24 of file TransientMemoryBackend.php.

Member Function Documentation

◆ collectGarbage()

TYPO3\CMS\Core\Cache\Backend\TransientMemoryBackend::collectGarbage ( )

Does nothing

Implements TYPO3\CMS\Core\Cache\Backend\BackendInterface.

Definition at line 136 of file TransientMemoryBackend.php.

◆ findIdentifiersByTag()

array TYPO3\CMS\Core\Cache\Backend\TransientMemoryBackend::findIdentifiersByTag (   $tag)

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

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

Implements TYPO3\CMS\Core\Cache\Backend\TaggableBackendInterface.

Definition at line 103 of file TransientMemoryBackend.php.

Referenced by TYPO3\CMS\Core\Cache\Backend\TransientMemoryBackend\flushByTag().

◆ flush()

TYPO3\CMS\Core\Cache\Backend\TransientMemoryBackend::flush ( )

Removes all cache entries of this cache.

Implements TYPO3\CMS\Core\Cache\Backend\BackendInterface.

Definition at line 114 of file TransientMemoryBackend.php.

◆ flushByTag()

TYPO3\CMS\Core\Cache\Backend\TransientMemoryBackend::flushByTag (   $tag)

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

Parameters
string$tag‪The tag the entries must have

Implements TYPO3\CMS\Core\Cache\Backend\TaggableBackendInterface.

Definition at line 125 of file TransientMemoryBackend.php.

References TYPO3\CMS\Webhooks\Message\$identifier, and TYPO3\CMS\Core\Cache\Backend\TransientMemoryBackend\findIdentifiersByTag().

◆ get()

mixed TYPO3\CMS\Core\Cache\Backend\TransientMemoryBackend::get (   $entryIdentifier)

Loads data from the cache.

Parameters
string$entryIdentifier‪An 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 TYPO3\CMS\Core\Cache\Backend\BackendInterface.

Definition at line 60 of file TransientMemoryBackend.php.

◆ has()

bool TYPO3\CMS\Core\Cache\Backend\TransientMemoryBackend::has (   $entryIdentifier)

Checks if a cache entry with the specified identifier exists.

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

Implements TYPO3\CMS\Core\Cache\Backend\BackendInterface.

Definition at line 71 of file TransientMemoryBackend.php.

◆ remove()

bool TYPO3\CMS\Core\Cache\Backend\TransientMemoryBackend::remove (   $entryIdentifier)

Removes all cache entries matching the specified identifier.

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

Implements TYPO3\CMS\Core\Cache\Backend\BackendInterface.

Definition at line 82 of file TransientMemoryBackend.php.

◆ set()

TYPO3\CMS\Core\Cache\Backend\TransientMemoryBackend::set (   $entryIdentifier,
  $data,
array  $tags = [],
  $lifetime = null 
)

Saves data in the cache.

Parameters
string$entryIdentifier‪An identifier for this specific cache entry
string$data‪The data to be stored
array$tags‪Tags to associate with this cache entry
int$lifetime‪Lifetime of this cache entry in seconds. If NULL is specified, the default lifetime is used. "0" means unlimited lifetime.
Exceptions
Exception‪if no cache frontend has been set.

Implements TYPO3\CMS\Core\Cache\Backend\BackendInterface.

Definition at line 43 of file TransientMemoryBackend.php.

Member Data Documentation

◆ $entries

array TYPO3\CMS\Core\Cache\Backend\TransientMemoryBackend::$entries = array( )
protected

Definition at line 28 of file TransientMemoryBackend.php.

◆ $tagsAndEntries

array TYPO3\CMS\Core\Cache\Backend\TransientMemoryBackend::$tagsAndEntries = array( )
protected

Definition at line 32 of file TransientMemoryBackend.php.