TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Core\Cache\Frontend\StringFrontend Class Reference
Inheritance diagram for TYPO3\CMS\Core\Cache\Frontend\StringFrontend:
TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend TYPO3\CMS\Core\Cache\Frontend\FrontendInterface t3lib_cache_frontend_StringFrontend TYPO3\CMS\Core\Cache\Frontend\PhpFrontend t3lib_cache_frontend_PhpFrontend

Public Member Functions

 set ($entryIdentifier, $string, array $tags=array(), $lifetime=NULL)
 
 get ($entryIdentifier)
 
 getByTag ($tag)
 
- Public Member Functions inherited from TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend
 __construct ($identifier, \TYPO3\CMS\Core\Cache\Backend\BackendInterface $backend)
 
 getIdentifier ()
 
 getBackend ()
 
 has ($entryIdentifier)
 
 remove ($entryIdentifier)
 
 flush ()
 
 flushByTag ($tag)
 
 collectGarbage ()
 
 isValidEntryIdentifier ($identifier)
 
 isValidTag ($tag)
 

Additional Inherited Members

- Public Attributes inherited from TYPO3\CMS\Core\Cache\Frontend\FrontendInterface
const TAG_CLASS = '%CLASS%'
 
const TAG_PACKAGE = '%PACKAGE%'
 
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
 $identifier
 
 $backend
 

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 cache frontend for strings. Nothing else.

This file is a backport from FLOW3

Author
Karsten Dambekalns karst.nosp@m.en@t.nosp@m.ypo3..nosp@m.org

Definition at line 24 of file StringFrontend.php.

Member Function Documentation

◆ get()

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

Finds and returns a variable value from the cache.

Parameters
string$entryIdentifierIdentifier of the cache entry to fetch
Returns
string The value
Exceptions

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

Definition at line 61 of file StringFrontend.php.

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

◆ getByTag()

TYPO3\CMS\Core\Cache\Frontend\StringFrontend::getByTag (   $tag)

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

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

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

Definition at line 76 of file StringFrontend.php.

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

◆ set()

TYPO3\CMS\Core\Cache\Frontend\StringFrontend::set (   $entryIdentifier,
  $string,
array  $tags = array(),
  $lifetime = NULL 
)

Saves the value of a PHP variable in the cache.

Parameters
string$entryIdentifierAn identifier used for this cache entry
string$stringThe variable to cache
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\Frontend\FrontendInterface.

Definition at line 38 of file StringFrontend.php.

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