TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend Class Reference
Inheritance diagram for TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend:
TYPO3\CMS\Core\Cache\Frontend\FrontendInterface TYPO3\CMS\Core\Cache\Frontend\StringFrontend TYPO3\CMS\Core\Cache\Frontend\VariableFrontend TYPO3\CMS\Core\Cache\Frontend\PhpFrontend

Public Member Functions

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

Protected Attributes

 $identifier
 
 $backend
 

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}$/'
 

Detailed Description

An abstract cache

This file is a backport from FLOW3

Definition at line 28 of file AbstractFrontend.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend::__construct (   $identifier,
BackendInterface  $backend 
)

Constructs the cache

Parameters
string$identifierAn identifier which describes this cache
BackendInterface$backendBackend to be used for this cache
Exceptions

Definition at line 49 of file AbstractFrontend.php.

References TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend\$backend, and TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend\$identifier.

Member Function Documentation

◆ collectGarbage()

TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend::collectGarbage ( )

Does garbage collection

Returns
void

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

Definition at line 154 of file AbstractFrontend.php.

◆ flush()

TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend::flush ( )

Removes all cache entries of this cache.

Returns
void

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

Definition at line 119 of file AbstractFrontend.php.

◆ flushByTag()

TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend::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
Exceptions

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

Definition at line 132 of file AbstractFrontend.php.

References $GLOBALS, $params, TYPO3\CMS\Core\Utility\GeneralUtility\callUserFunction(), and TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend\isValidTag().

◆ getBackend()

TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend::getBackend ( )

Returns the backend used by this cache

Returns
BackendInterface The backend used by this cache

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

Definition at line 76 of file AbstractFrontend.php.

References TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend\$backend.

◆ getIdentifier()

TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend::getIdentifier ( )

Returns this cache's identifier

Returns
string The identifier for this cache

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

Definition at line 65 of file AbstractFrontend.php.

References TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend\$identifier.

◆ has()

TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend::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
Exceptions

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

Definition at line 89 of file AbstractFrontend.php.

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

◆ isValidEntryIdentifier()

TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend::isValidEntryIdentifier (   $identifier)

◆ isValidTag()

TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend::isValidTag (   $tag)

◆ remove()

TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend::remove (   $entryIdentifier)

Removes the given cache entry from the cache.

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

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

Definition at line 105 of file AbstractFrontend.php.

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

Member Data Documentation

◆ $backend

TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend::$backend
protected

◆ $identifier