TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Core\Cache\Backend\BackendInterface Interface Reference
Inheritance diagram for TYPO3\CMS\Core\Cache\Backend\BackendInterface:
t3lib_cache_backend_Backend TYPO3\CMS\Core\Cache\Backend\AbstractBackend TYPO3\CMS\Core\Cache\Backend\FreezableBackendInterface TYPO3\CMS\Core\Cache\Backend\PhpCapableBackendInterface TYPO3\CMS\Core\Cache\Backend\TaggableBackendInterface t3lib_cache_backend_AbstractBackend TYPO3\CMS\Core\Cache\Backend\ApcBackend TYPO3\CMS\Core\Cache\Backend\EarlyClassLoaderBackend TYPO3\CMS\Core\Cache\Backend\MemcachedBackend TYPO3\CMS\Core\Cache\Backend\NullBackend TYPO3\CMS\Core\Cache\Backend\PdoBackend TYPO3\CMS\Core\Cache\Backend\RedisBackend TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend TYPO3\CMS\Core\Cache\Backend\TransientMemoryBackend TYPO3\CMS\Core\Cache\Backend\Typo3DatabaseBackend TYPO3\CMS\Core\Cache\Backend\WincacheBackend TYPO3\CMS\Core\Cache\Backend\XcacheBackend TYPO3\CMS\Core\Cache\Backend\FileBackend t3lib_cache_backend_PhpCapableBackend TYPO3\CMS\Core\Cache\Backend\EarlyClassLoaderBackend TYPO3\CMS\Core\Cache\Backend\FileBackend TYPO3\CMS\Core\Cache\Backend\NullBackend TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend TYPO3\CMS\Core\Cache\Backend\ApcBackend TYPO3\CMS\Core\Cache\Backend\FileBackend TYPO3\CMS\Core\Cache\Backend\MemcachedBackend TYPO3\CMS\Core\Cache\Backend\NullBackend TYPO3\CMS\Core\Cache\Backend\PdoBackend TYPO3\CMS\Core\Cache\Backend\RedisBackend TYPO3\CMS\Core\Cache\Backend\TransientMemoryBackend TYPO3\CMS\Core\Cache\Backend\Typo3DatabaseBackend TYPO3\CMS\Core\Cache\Backend\WincacheBackend TYPO3\CMS\Core\Cache\Backend\XcacheBackend

Public Member Functions

 setCache (\TYPO3\CMS\Core\Cache\Frontend\FrontendInterface $cache)
 
 set ($entryIdentifier, $data, array $tags=array(), $lifetime=NULL)
 
 get ($entryIdentifier)
 
 has ($entryIdentifier)
 
 remove ($entryIdentifier)
 
 flush ()
 
 collectGarbage ()
 

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! A contract for a Cache Backend

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

Definition at line 22 of file BackendInterface.php.

Member Function Documentation

◆ collectGarbage()

◆ flush()

◆ get()

◆ has()

◆ remove()

TYPO3\CMS\Core\Cache\Backend\BackendInterface::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$entryIdentifierSpecifies 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 TYPO3\CMS\Core\Cache\Backend\RedisBackend, TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend, TYPO3\CMS\Core\Cache\Backend\MemcachedBackend, TYPO3\CMS\Core\Cache\Backend\FileBackend, TYPO3\CMS\Core\Cache\Backend\Typo3DatabaseBackend, TYPO3\CMS\Core\Cache\Backend\ApcBackend, TYPO3\CMS\Core\Cache\Backend\PdoBackend, TYPO3\CMS\Core\Cache\Backend\XcacheBackend, TYPO3\CMS\Core\Cache\Backend\WincacheBackend, TYPO3\CMS\Core\Cache\Backend\EarlyClassLoaderBackend, TYPO3\CMS\Core\Cache\Backend\TransientMemoryBackend, and TYPO3\CMS\Core\Cache\Backend\NullBackend.

◆ set()

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

Saves data in the cache.

Parameters
string$entryIdentifierAn identifier for this specific cache entry
string$dataThe data to be stored
array$tagsTags to associate with this cache entry. If the backend does not support tags, this option can be ignored.
integer$lifetimeLifetime of this cache entry in seconds. If NULL is specified, the default lifetime is used. "0" means unlimited lifetime.
Returns
void
Exceptions

Implemented in TYPO3\CMS\Core\Cache\Backend\RedisBackend, TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend, TYPO3\CMS\Core\Cache\Backend\MemcachedBackend, TYPO3\CMS\Core\Cache\Backend\FileBackend, TYPO3\CMS\Core\Cache\Backend\ApcBackend, TYPO3\CMS\Core\Cache\Backend\Typo3DatabaseBackend, TYPO3\CMS\Core\Cache\Backend\PdoBackend, TYPO3\CMS\Core\Cache\Backend\XcacheBackend, TYPO3\CMS\Core\Cache\Backend\WincacheBackend, TYPO3\CMS\Core\Cache\Backend\EarlyClassLoaderBackend, TYPO3\CMS\Core\Cache\Backend\TransientMemoryBackend, and TYPO3\CMS\Core\Cache\Backend\NullBackend.

◆ setCache()

TYPO3\CMS\Core\Cache\Backend\BackendInterface::setCache ( \TYPO3\CMS\Core\Cache\Frontend\FrontendInterface  $cache)

Sets a reference to the cache frontend which uses this backend

Parameters
\TYPO3\CMS\Core\Cache\Frontend\FrontendInterface$cacheThe frontend for this backend
Returns
void

Implemented in TYPO3\CMS\Core\Cache\Backend\MemcachedBackend, TYPO3\CMS\Core\Cache\Backend\FileBackend, TYPO3\CMS\Core\Cache\Backend\ApcBackend, TYPO3\CMS\Core\Cache\Backend\Typo3DatabaseBackend, TYPO3\CMS\Core\Cache\Backend\AbstractBackend, and TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend.