‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Cache\Frontend\VariableFrontend Class Reference
Inheritance diagram for TYPO3\CMS\Core\Cache\Frontend\VariableFrontend:
TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend TYPO3\CMS\Core\Cache\Frontend\FrontendInterface

Public Member Functions

 set ($entryIdentifier, $variable, array $tags=[], $lifetime=null)
mixed get ($entryIdentifier)
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend
 __construct ($identifier, BackendInterface $backend)
string getIdentifier ()
BackendInterface getBackend ()
bool has ($entryIdentifier)
bool remove ($entryIdentifier)
 flush ()
 flushByTags (array $tags)
 flushByTag ($tag)
 collectGarbage ()
bool isValidEntryIdentifier ($identifier)
bool isValidTag ($tag)

Additional Inherited Members

- ‪Public Attributes inherited from ‪TYPO3\CMS\Core\Cache\Frontend\FrontendInterface
const TAG_CLASS = '%CLASS%'
const PATTERN_ENTRYIDENTIFIER = '/^[a-zA-Z0-9_%\\-&]{1,250}$/'
const PATTERN_TAG = '/^[a-zA-Z0-9_%\\-&]{1,250}$/'
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend
string $identifier
BackendInterface TaggableBackendInterface $backend

Detailed Description

A cache frontend for any kinds of PHP variables

Definition at line 24 of file VariableFrontend.php.

Member Function Documentation

◆ get()

mixed TYPO3\CMS\Core\Cache\Frontend\VariableFrontend::get (   $entryIdentifier)

Finds and returns a variable value from the cache.

string$entryIdentifier‪Identifier of the cache entry to fetch
‪mixed The value

Implements TYPO3\CMS\Core\Cache\Frontend\FrontendInterface.

Definition at line 73 of file VariableFrontend.php.

References TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend\isValidEntryIdentifier().

◆ set()

TYPO3\CMS\Core\Cache\Frontend\VariableFrontend::set (   $entryIdentifier,
array  $tags = [],
  $lifetime = null 

Saves the value of a PHP variable in the cache. Note that the variable will be serialized if necessary.

string$entryIdentifier‪An identifier used for this cache entry
mixed$variable‪The variable to cache
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.

Implements TYPO3\CMS\Core\Cache\Frontend\FrontendInterface.

Definition at line 36 of file VariableFrontend.php.

References $GLOBALS, TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend\isValidEntryIdentifier(), and TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend\isValidTag().