‪TYPO3CMS  ‪main
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\PhpFrontend TYPO3\CMS\Core\Cache\Frontend\VariableFrontend TYPO3\CMS\Core\Cache\Frontend\NullFrontend

Public Member Functions

 __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)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Core\Cache\Frontend\FrontendInterface
 set ($entryIdentifier, $data, array $tags=[], $lifetime=null)
 
mixed get ($entryIdentifier)
 

Protected Attributes

string $identifier
 
BackendInterface TaggableBackendInterface $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

Definition at line 24 of file AbstractFrontend.php.

Constructor & Destructor Documentation

◆ __construct()

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

Constructs the cache

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

Definition at line 43 of file AbstractFrontend.php.

References TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend\$backend, TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend\$identifier, and TYPO3\CMS\Core\Cache\Backend\BackendInterface\setCache().

Member Function Documentation

◆ collectGarbage()

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

Does garbage collection

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

Definition at line 149 of file AbstractFrontend.php.

◆ flush()

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

Removes all cache entries of this cache.

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

Definition at line 106 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$tag‪The tag the entries must have
Exceptions

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

Definition at line 135 of file AbstractFrontend.php.

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

◆ flushByTags()

TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend::flushByTags ( array  $tags)

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

Parameters
string[]$tags
Exceptions

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

Definition at line 117 of file AbstractFrontend.php.

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

◆ getBackend()

BackendInterface 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 68 of file AbstractFrontend.php.

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

◆ getIdentifier()

string 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 58 of file AbstractFrontend.php.

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

◆ has()

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

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

Definition at line 80 of file AbstractFrontend.php.

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

◆ isValidEntryIdentifier()

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

◆ isValidTag()

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

Checks the validity of a tag. Returns TRUE if it's valid.

Parameters
string | array$tag‪An identifier to be checked for validity
Returns
‪bool

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

Definition at line 171 of file AbstractFrontend.php.

Referenced by TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend\flushByTag(), TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend\flushByTags(), TYPO3\CMS\Core\Cache\Frontend\VariableFrontend\set(), and TYPO3\CMS\Core\Cache\Frontend\PhpFrontend\set().

◆ remove()

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

Removes the given cache entry from the cache.

Parameters
string$entryIdentifier‪An 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 95 of file AbstractFrontend.php.

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

Member Data Documentation

◆ $backend

◆ $identifier