TYPO3 CMS  TYPO3_6-2
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\BackendInterface TYPO3\CMS\Core\Cache\Backend\BackendInterface t3lib_cache_backend_TransientMemoryBackend

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 TYPO3\CMS\Core\Cache\Backend\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 TYPO3\CMS\Core\Cache\Backend\AbstractBackend
 $cache
 
 $cacheIdentifier
 
 $context
 
 $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
 calculateExpiryTime ($lifetime=NULL)
 

Detailed Description

This file is part of the TYPO3 CMS project.

It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the License, or any later version.

For the full copyright and license information, please read the LICENSE.txt file that was distributed with this source code.

The TYPO3 project - inspiring people to share! A caching backend which stores cache entries during one script run.

This file is a backport from FLOW3

Author
Robert Lemke rober.nosp@m.t@ty.nosp@m.po3.o.nosp@m.rg

Definition at line 24 of file TransientMemoryBackend.php.

Member Function Documentation

◆ collectGarbage()

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

Does nothing

Returns
void

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

Definition at line 151 of file TransientMemoryBackend.php.

◆ findIdentifiersByTag()

TYPO3\CMS\Core\Cache\Backend\TransientMemoryBackend::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 TYPO3\CMS\Core\Cache\Backend\TaggableBackendInterface.

Definition at line 112 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.

Returns
void

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

Definition at line 126 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$tagThe tag the entries must have
Returns
void

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

Definition at line 138 of file TransientMemoryBackend.php.

References TYPO3\CMS\Core\Cache\Backend\TransientMemoryBackend\findIdentifiersByTag().

◆ get()

TYPO3\CMS\Core\Cache\Backend\TransientMemoryBackend::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 TYPO3\CMS\Core\Cache\Backend\BackendInterface.

Definition at line 68 of file TransientMemoryBackend.php.

◆ has()

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

Checks if a cache entry with the specified identifier exists.

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

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

Definition at line 79 of file TransientMemoryBackend.php.

◆ remove()

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

Removes all cache entries matching the specified identifier.

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

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

Definition at line 90 of file TransientMemoryBackend.php.

◆ set()

TYPO3\CMS\Core\Cache\Backend\TransientMemoryBackend::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
integer$lifetimeLifetime of this cache entry in seconds. If NULL is specified, the default lifetime is used. "0" means unlimited liftime.
Returns
void
Exceptions

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

Definition at line 48 of file TransientMemoryBackend.php.

Member Data Documentation

◆ $entries

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

Definition at line 29 of file TransientMemoryBackend.php.

◆ $tagsAndEntries

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

Definition at line 34 of file TransientMemoryBackend.php.