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

Public Member Functions

 __construct ($identifier, \TYPO3\CMS\Core\Cache\Backend\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=array(), $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

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! An abstract cache

This file is a backport from FLOW3

Author
Robert Lemke rober.nosp@m.t@ty.nosp@m.po3.o.nosp@m.rg
Karsten Dambekalns karst.nosp@m.en@t.nosp@m.ypo3..nosp@m.org

Definition at line 25 of file AbstractFrontend.php.

Constructor & Destructor Documentation

◆ __construct()

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

Constructs the cache

Parameters
string$identifierA identifier which describes this cache
\TYPO3\CMS\Core\Cache\Backend\BackendInterface$backendBackend to be used for this cache
Exceptions

Definition at line 46 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 144 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 111 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 123 of file AbstractFrontend.php.

References $GLOBALS, 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
The backend used by this cache

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

Definition at line 71 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 61 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
boolean TRUE if such an entry exists, FALSE if not
Exceptions

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

Definition at line 83 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
boolean TRUE if such an entry exists, FALSE if not
Exceptions

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

Definition at line 98 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