TYPO3
7.6
|
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 () | |
A contract for a Cache Backend
Definition at line 21 of file core/Classes/Cache/Backend/BackendInterface.php.
collectGarbage | ( | ) |
Does garbage collection
Implemented in RedisBackend, MemcachedBackend, SimpleFileBackend, FileBackend, ApcBackend, Typo3DatabaseBackend, XcacheBackend, WincacheBackend, PdoBackend, TransientMemoryBackend, and NullBackend.
flush | ( | ) |
Removes all cache entries of this cache.
Implemented in RedisBackend, SimpleFileBackend, MemcachedBackend, FileBackend, Typo3DatabaseBackend, ApcBackend, XcacheBackend, PdoBackend, WincacheBackend, TransientMemoryBackend, and NullBackend.
get | ( | $entryIdentifier | ) |
Loads data from the cache.
string | $entryIdentifier | An identifier which describes the cache entry to load |
Implemented in RedisBackend, SimpleFileBackend, MemcachedBackend, FileBackend, Typo3DatabaseBackend, ApcBackend, PdoBackend, XcacheBackend, WincacheBackend, TransientMemoryBackend, and NullBackend.
has | ( | $entryIdentifier | ) |
Checks if a cache entry with the specified identifier exists.
string | $entryIdentifier | An identifier specifying the cache entry |
Implemented in RedisBackend, SimpleFileBackend, MemcachedBackend, FileBackend, Typo3DatabaseBackend, ApcBackend, PdoBackend, XcacheBackend, WincacheBackend, TransientMemoryBackend, and NullBackend.
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.
string | $entryIdentifier | Specifies the cache entry to remove |
Implemented in RedisBackend, SimpleFileBackend, MemcachedBackend, FileBackend, Typo3DatabaseBackend, ApcBackend, PdoBackend, XcacheBackend, WincacheBackend, TransientMemoryBackend, and NullBackend.
set | ( | $entryIdentifier, | |
$data, | |||
array | $tags = array() , |
||
$lifetime = null |
|||
) |
Saves data in the cache.
string | $entryIdentifier | An identifier for this specific cache entry |
string | $data | The data to be stored |
array | $tags | Tags to associate with this cache entry. If the backend does not support tags, this option can be ignored. |
int | $lifetime | Lifetime of this cache entry in seconds. If NULL is specified, the default lifetime is used. "0" means unlimited lifetime. |
\TYPO3\CMS\Core\Cache\Exception | if no cache frontend has been set. |
\TYPO3\CMS\Core\Cache\Exception\InvalidDataException | if the data is not a string |
Implemented in RedisBackend, SimpleFileBackend, MemcachedBackend, FileBackend, ApcBackend, Typo3DatabaseBackend, PdoBackend, XcacheBackend, WincacheBackend, TransientMemoryBackend, and NullBackend.
setCache | ( | \TYPO3\CMS\Core\Cache\Frontend\FrontendInterface | $cache | ) |
Sets a reference to the cache frontend which uses this backend
\TYPO3\CMS\Core\Cache\Frontend\FrontendInterface | $cache | The frontend for this backend |
Implemented in MemcachedBackend, FileBackend, SimpleFileBackend, ApcBackend, Typo3DatabaseBackend, and AbstractBackend.