TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Core\Cache\Frontend\FrontendInterface Interface Reference
Inheritance diagram for TYPO3\CMS\Core\Cache\Frontend\FrontendInterface:
t3lib_cache_frontend_Frontend TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend 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

 getIdentifier ()
 
 getBackend ()
 
 set ($entryIdentifier, $data, array $tags=array(), $lifetime=NULL)
 
 get ($entryIdentifier)
 
 getByTag ($tag)
 
 has ($entryIdentifier)
 
 remove ($entryIdentifier)
 
 flush ()
 
 flushByTag ($tag)
 
 collectGarbage ()
 
 isValidEntryIdentifier ($identifier)
 
 isValidTag ($tag)
 

Public Attributes

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! Contract for a Cache (frontend)

Author
Ingo Renner ingo@.nosp@m.typo.nosp@m.3.org

Definition at line 22 of file FrontendInterface.php.

Member Function Documentation

◆ collectGarbage()

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

Does garbage collection

Returns
void

Implemented in TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend.

◆ flush()

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

Removes all cache entries of this cache.

Returns
void

Implemented in TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend.

◆ flushByTag()

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

Implemented in TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend.

◆ get()

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

Finds and returns data from the cache.

Parameters
string$entryIdentifierSomething which identifies the cache entry - depends on concrete cache
Returns
mixed

Implemented in TYPO3\CMS\Core\Cache\Frontend\VariableFrontend, and TYPO3\CMS\Core\Cache\Frontend\StringFrontend.

◆ getBackend()

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

Returns the backend used by this cache

Returns
The backend used by this cache

Implemented in TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend.

◆ getByTag()

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

Implemented in TYPO3\CMS\Core\Cache\Frontend\VariableFrontend, and TYPO3\CMS\Core\Cache\Frontend\StringFrontend.

◆ getIdentifier()

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

Returns this cache's identifier

Returns
string The identifier for this cache

Implemented in TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend.

◆ has()

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

Implemented in TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend.

◆ isValidEntryIdentifier()

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

Checks the validity of an entry identifier. Returns TRUE if it's valid.

Parameters
string$identifierAn identifier to be checked for validity
Returns
boolean

Implemented in TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend.

◆ isValidTag()

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

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

Parameters
string$tagA tag to be checked for validity
Returns
boolean

Implemented in TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend.

◆ remove()

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

Implemented in TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend.

◆ set()

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

Saves data in the cache.

Parameters
string$entryIdentifierSomething which identifies the data - depends on concrete cache
mixed$dataThe data to cache - also depends on the concrete cache implementation
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

Implemented in TYPO3\CMS\Core\Cache\Frontend\VariableFrontend, TYPO3\CMS\Core\Cache\Frontend\PhpFrontend, and TYPO3\CMS\Core\Cache\Frontend\StringFrontend.

Member Data Documentation

◆ PATTERN_ENTRYIDENTIFIER

const TYPO3\CMS\Core\Cache\Frontend\FrontendInterface::PATTERN_ENTRYIDENTIFIER = '/^[a-zA-Z0-9_%\\-&]{1,250}$/'

Pattern an entry identifer must match.

Definition at line 35 of file FrontendInterface.php.

◆ PATTERN_TAG

const TYPO3\CMS\Core\Cache\Frontend\FrontendInterface::PATTERN_TAG = '/^[a-zA-Z0-9_%\\-&]{1,250}$/'

Pattern a tag must match.

Definition at line 39 of file FrontendInterface.php.

◆ TAG_CLASS

const TYPO3\CMS\Core\Cache\Frontend\FrontendInterface::TAG_CLASS = '%CLASS%'

"Magic" tag for class-related entries

Definition at line 27 of file FrontendInterface.php.

Referenced by TYPO3\CMS\Core\Cache\CacheManager\getClassTag().

◆ TAG_PACKAGE

const TYPO3\CMS\Core\Cache\Frontend\FrontendInterface::TAG_PACKAGE = '%PACKAGE%'

"Magic" tag for package-related entries

Definition at line 31 of file FrontendInterface.php.