TYPO3  7.6
Public Member Functions | Public Attributes | List of all members
FrontendInterface Interface Reference
Inheritance diagram for FrontendInterface:
AbstractFrontend StringFrontend VariableFrontend 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

Contract for a Cache (frontend)

Definition at line 21 of file FrontendInterface.php.

Member Function Documentation

collectGarbage ( )

Does garbage collection

Returns
void

Implemented in AbstractFrontend.

flush ( )

Removes all cache entries of this cache.

Returns
void

Implemented in 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

Implemented in AbstractFrontend.

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 VariableFrontend, and StringFrontend.

getBackend ( )

Returns the backend used by this cache

Returns
The backend used by this cache

Implemented in AbstractFrontend.

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 VariableFrontend, and StringFrontend.

getIdentifier ( )

Returns this cache's identifier

Returns
string The identifier for this cache

Implemented in 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

Implemented in AbstractFrontend.

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
bool

Implemented in AbstractFrontend.

isValidTag (   $tag)

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

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

Implemented in 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

Implemented in AbstractFrontend.

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
int$lifetimeLifetime of this cache entry in seconds. If NULL is specified, the default lifetime is used. "0" means unlimited liftime.
Returns
void

Implemented in VariableFrontend, PhpFrontend, and StringFrontend.

Member Data Documentation

const PATTERN_ENTRYIDENTIFIER = '/^[a-zA-Z0-9_%\\-&]{1,250}$/'

Pattern an entry identifer must match.

Definition at line 34 of file FrontendInterface.php.

const PATTERN_TAG = '/^[a-zA-Z0-9_%\\-&]{1,250}$/'

Pattern a tag must match.

Definition at line 38 of file FrontendInterface.php.

const TAG_CLASS = '%CLASS%'

"Magic" tag for class-related entries

Definition at line 26 of file FrontendInterface.php.

const TAG_PACKAGE = '%PACKAGE%'

"Magic" tag for package-related entries

Definition at line 30 of file FrontendInterface.php.