TYPO3 API  SVNRelease
Public Member Functions
t3lib_cache_backend_Backend Interface Reference
Inheritance diagram for t3lib_cache_backend_Backend:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 setCache (t3lib_cache_frontend_Frontend $cache)
 set ($entryIdentifier, $data, array $tags=array(), $lifetime=NULL)
 get ($entryIdentifier)
 has ($entryIdentifier)
 remove ($entryIdentifier)
 flush ()
 flushByTag ($tag)
 flushByTags (array $tags)
 findIdentifiersByTag ($tag)
 findIdentifiersByTags (array $tags)
 collectGarbage ()

Detailed Description

Definition at line 37 of file interface.t3lib_cache_backend_backend.php.


Member Function Documentation

t3lib_cache_backend_Backend::collectGarbage ( )
t3lib_cache_backend_Backend::findIdentifiersByTag ( tag)

Finds and returns all cache entry identifiers which are tagged by the specified tag.

Parameters:
string$tagThe tag to search for
Returns:
array An array with identifiers of all matching entries. An empty array if no entries matched

Implemented in t3lib_cache_backend_RedisBackend, t3lib_cache_backend_FileBackend, t3lib_cache_backend_MemcachedBackend, t3lib_cache_backend_PdoBackend, t3lib_cache_backend_DbBackend, t3lib_cache_backend_ApcBackend, t3lib_cache_backend_TransientMemoryBackend, and t3lib_cache_backend_NullBackend.

t3lib_cache_backend_Backend::findIdentifiersByTags ( array $  tags)

Finds and returns all cache entry identifiers which are tagged by the specified tags. The asterisk ("*") is allowed as a wildcard at the beginning and the end of a tag.

Parameters:
arrayArray of tags to search for, the "*" wildcard is supported
Returns:
array An array with identifiers of all matching entries. An empty array if no entries matched
Author:
Ingo Renner <ingo@typo3.org>

Implemented in t3lib_cache_backend_RedisBackend, t3lib_cache_backend_FileBackend, t3lib_cache_backend_MemcachedBackend, t3lib_cache_backend_PdoBackend, t3lib_cache_backend_DbBackend, t3lib_cache_backend_ApcBackend, t3lib_cache_backend_TransientMemoryBackend, and t3lib_cache_backend_NullBackend.

t3lib_cache_backend_Backend::flush ( )
t3lib_cache_backend_Backend::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 t3lib_cache_backend_RedisBackend, t3lib_cache_backend_FileBackend, t3lib_cache_backend_MemcachedBackend, t3lib_cache_backend_DbBackend, t3lib_cache_backend_PdoBackend, t3lib_cache_backend_ApcBackend, t3lib_cache_backend_TransientMemoryBackend, and t3lib_cache_backend_NullBackend.

t3lib_cache_backend_Backend::flushByTags ( array $  tags)

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

Parameters:
arrayThe tags the entries must have
Returns:
void
Author:
Ingo Renner <ingo@typo3.org>

Implemented in t3lib_cache_backend_RedisBackend, t3lib_cache_backend_FileBackend, t3lib_cache_backend_MemcachedBackend, t3lib_cache_backend_DbBackend, t3lib_cache_backend_ApcBackend, t3lib_cache_backend_TransientMemoryBackend, and t3lib_cache_backend_NullBackend.

t3lib_cache_backend_Backend::get ( entryIdentifier)

Loads data from the cache.

Parameters:
string$entryIdentifierAn identifier which describes the cache entry to load
Returns:
mixed The cache entry's content as a string or FALSE if the cache entry could not be loaded

Implemented in t3lib_cache_backend_RedisBackend, t3lib_cache_backend_MemcachedBackend, t3lib_cache_backend_FileBackend, t3lib_cache_backend_PdoBackend, t3lib_cache_backend_DbBackend, t3lib_cache_backend_ApcBackend, t3lib_cache_backend_TransientMemoryBackend, and t3lib_cache_backend_NullBackend.

t3lib_cache_backend_Backend::has ( entryIdentifier)

Checks if a cache entry with the specified identifier exists.

Parameters:
string$entryIdentifier,:An identifier specifying the cache entry
Returns:
boolean TRUE if such an entry exists, FALSE if not

Implemented in t3lib_cache_backend_RedisBackend, t3lib_cache_backend_MemcachedBackend, t3lib_cache_backend_FileBackend, t3lib_cache_backend_PdoBackend, t3lib_cache_backend_DbBackend, t3lib_cache_backend_ApcBackend, t3lib_cache_backend_TransientMemoryBackend, and t3lib_cache_backend_NullBackend.

t3lib_cache_backend_Backend::remove ( entryIdentifier)

Removes all cache entries matching the specified identifier. Usually this only affects one entry but if - for what reason ever - old entries for the identifier still exist, they are removed as well.

Parameters:
string$entryIdentifier,:Specifies the cache entry to remove
Returns:
boolean TRUE if (at least) an entry could be removed or FALSE if no entry was found

Implemented in t3lib_cache_backend_RedisBackend, t3lib_cache_backend_MemcachedBackend, t3lib_cache_backend_FileBackend, t3lib_cache_backend_PdoBackend, t3lib_cache_backend_DbBackend, t3lib_cache_backend_ApcBackend, t3lib_cache_backend_TransientMemoryBackend, and t3lib_cache_backend_NullBackend.

t3lib_cache_backend_Backend::set ( entryIdentifier,
data,
array $  tags = array(),
lifetime = NULL 
)

Saves data in the cache.

Parameters:
stringAn identifier for this specific cache entry
stringThe data to be stored
arrayTags to associate with this cache entry
integerLifetime of this cache entry in seconds. If NULL is specified, the default lifetime is used. "0" means unlimited liftime.
Returns:
void
Exceptions:
t3lib_cache_Exceptionif no cache frontend has been set.
InvalidArgumentExceptionif the identifier is not valid
t3lib_cache_Exception_InvalidDataif the data is not a string

Implemented in t3lib_cache_backend_RedisBackend, t3lib_cache_backend_MemcachedBackend, t3lib_cache_backend_FileBackend, t3lib_cache_backend_PdoBackend, t3lib_cache_backend_ApcBackend, t3lib_cache_backend_DbBackend, t3lib_cache_backend_TransientMemoryBackend, and t3lib_cache_backend_NullBackend.

t3lib_cache_backend_Backend::setCache ( t3lib_cache_frontend_Frontend cache)

Sets a reference to the cache frontend which uses this backend

Parameters:
t3lib_cache_frontend_Frontend$cacheThe frontend for this backend
Returns:
void

Implemented in t3lib_cache_backend_MemcachedBackend, t3lib_cache_backend_PdoBackend, t3lib_cache_backend_ApcBackend, t3lib_cache_backend_AbstractBackend, and t3lib_cache_backend_FileBackend.


The documentation for this interface was generated from the following file: