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) | |
findIdentifiersByTag ($tag) | |
flush () | |
flushByTag ($tag) | |
collectGarbage () | |
getCacheTable () | |
getTagsTable () | |
setCompression ($compression) | |
setCompressionLevel ($compressionLevel) | |
getTableDefinitions () | |
Public Member Functions inherited from AbstractBackend | |
__construct ($context, array $options=array()) | |
setCache (\TYPO3\CMS\Core\Cache\Frontend\FrontendInterface $cache) | |
setDefaultLifetime ($defaultLifetime) | |
Public Attributes | |
const | FAKED_UNLIMITED_EXPIRE = 2145909600 |
Public Attributes inherited from AbstractBackend | |
const | DATETIME_EXPIRYTIME_UNLIMITED = '9999-12-31T23:59:59+0000' |
const | UNLIMITED_LIFETIME = 0 |
Protected Member Functions | |
initializeCommonReferences () | |
flushByTagDbal ($tag) | |
collectGarbageDbal () | |
throwExceptionIfFrontendDoesNotExist () | |
Protected Member Functions inherited from AbstractBackend | |
calculateExpiryTime ($lifetime=null) | |
Protected Attributes | |
$cacheTable | |
$tagsTable | |
$compression = false | |
$compressionLevel = -1 | |
$identifierField | |
$expiresField | |
$maximumLifetime | |
$notExpiredStatement | |
$expiredStatement | |
$tableList | |
$tableJoin | |
Protected Attributes inherited from AbstractBackend | |
$cache | |
$cacheIdentifier | |
$context | |
$defaultLifetime = 3600 | |
A caching backend which stores cache entries in database tables
Definition at line 21 of file Typo3DatabaseBackend.php.
collectGarbage | ( | ) |
Does garbage collection
Implements BackendInterface.
Definition at line 316 of file Typo3DatabaseBackend.php.
References $GLOBALS, Typo3DatabaseBackend\collectGarbageDbal(), and Typo3DatabaseBackend\throwExceptionIfFrontendDoesNotExist().
|
protected |
Does garbage collection for DBAL databases
Definition at line 336 of file Typo3DatabaseBackend.php.
References $GLOBALS.
Referenced by Typo3DatabaseBackend\collectGarbage().
findIdentifiersByTag | ( | $tag | ) |
Finds and returns all cache entries which are tagged by the specified tag.
string | $tag | The tag to search for |
Implements TaggableBackendInterface.
Definition at line 240 of file Typo3DatabaseBackend.php.
References $GLOBALS, and Typo3DatabaseBackend\throwExceptionIfFrontendDoesNotExist().
flush | ( | ) |
Removes all cache entries of this cache.
Implements BackendInterface.
Definition at line 261 of file Typo3DatabaseBackend.php.
References $GLOBALS, and Typo3DatabaseBackend\throwExceptionIfFrontendDoesNotExist().
flushByTag | ( | $tag | ) |
Removes all cache entries of this cache which are tagged by the specified tag.
string | $tag | The tag the entries must have |
Implements TaggableBackendInterface.
Definition at line 274 of file Typo3DatabaseBackend.php.
References $GLOBALS, Typo3DatabaseBackend\flushByTagDbal(), and Typo3DatabaseBackend\throwExceptionIfFrontendDoesNotExist().
|
protected |
Removes all cache entries of this cache for DBAL databases which are tagged by the specified tag.
string | $tag | The tag the entries must have |
Definition at line 295 of file Typo3DatabaseBackend.php.
References $GLOBALS.
Referenced by Typo3DatabaseBackend\flushByTag().
get | ( | $entryIdentifier | ) |
Loads data from a cache file.
string | $entryIdentifier | An identifier which describes the cache entry to load |
Implements BackendInterface.
Definition at line 170 of file Typo3DatabaseBackend.php.
References $GLOBALS, and Typo3DatabaseBackend\throwExceptionIfFrontendDoesNotExist().
getCacheTable | ( | ) |
Returns the table where the cache entries are stored.
Definition at line 358 of file Typo3DatabaseBackend.php.
References Typo3DatabaseBackend\$cacheTable, and Typo3DatabaseBackend\throwExceptionIfFrontendDoesNotExist().
getTableDefinitions | ( | ) |
Calculate needed table definitions for this cache. This helper method is used by install tool and extension manager and is not part of the public API!
Definition at line 419 of file Typo3DatabaseBackend.php.
getTagsTable | ( | ) |
Gets the table where cache tags are stored.
Definition at line 369 of file Typo3DatabaseBackend.php.
References Typo3DatabaseBackend\$tagsTable, and Typo3DatabaseBackend\throwExceptionIfFrontendDoesNotExist().
has | ( | $entryIdentifier | ) |
Checks if a cache entry with the specified identifier exists.
string | $entryIdentifier | Specifies the identifier to check for existence |
Implements BackendInterface.
Definition at line 194 of file Typo3DatabaseBackend.php.
References $GLOBALS, and Typo3DatabaseBackend\throwExceptionIfFrontendDoesNotExist().
|
protected |
Initializes common references used in this backend.
Definition at line 102 of file Typo3DatabaseBackend.php.
References $GLOBALS, and Typo3DatabaseBackend\$tagsTable.
Referenced by Typo3DatabaseBackend\setCache().
remove | ( | $entryIdentifier | ) |
Removes all cache entries matching the specified identifier. Usually this only affects one entry.
string | $entryIdentifier | Specifies the cache entry to remove |
Implements BackendInterface.
Definition at line 216 of file Typo3DatabaseBackend.php.
References $GLOBALS, and Typo3DatabaseBackend\throwExceptionIfFrontendDoesNotExist().
set | ( | $entryIdentifier, | |
$data, | |||
array | $tags = array() , |
||
$lifetime = null |
|||
) |
Saves data in a cache file.
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 |
int | $lifetime | Lifetime of this cache entry in seconds. If NULL is specified, the default lifetime is used. "0" means unlimited liftime. |
\TYPO3\CMS\Core\Cache\Exception | if no cache frontend has been set. |
\TYPO3\CMS\Core\Cache\Exception\InvalidDataException | if the data to be stored is not a string. |
Implements BackendInterface.
Definition at line 124 of file Typo3DatabaseBackend.php.
References AbstractBackend\$defaultLifetime, $GLOBALS, Typo3DatabaseBackend\$maximumLifetime, and Typo3DatabaseBackend\throwExceptionIfFrontendDoesNotExist().
setCache | ( | \TYPO3\CMS\Core\Cache\Frontend\FrontendInterface | $cache | ) |
Set cache frontend instance and calculate data and tags table name
\TYPO3\CMS\Core\Cache\Frontend\FrontendInterface | $cache | The frontend for this backend |
Implements BackendInterface.
Definition at line 89 of file Typo3DatabaseBackend.php.
References AbstractBackend\$cacheIdentifier, and Typo3DatabaseBackend\initializeCommonReferences().
setCompression | ( | $compression | ) |
Enable data compression
bool | $compression | TRUE to enable compression |
Definition at line 380 of file Typo3DatabaseBackend.php.
References Typo3DatabaseBackend\$compression.
setCompressionLevel | ( | $compressionLevel | ) |
Set data compression level. If compression is enabled and this is not set, gzcompress default level will be used
int | -1 to 9: Compression level |
Definition at line 392 of file Typo3DatabaseBackend.php.
References Typo3DatabaseBackend\$compressionLevel.
|
protected |
Check if required frontend instance exists
\TYPO3\CMS\Core\Cache\Exception | If there is no frontend instance in $this->cache |
Definition at line 405 of file Typo3DatabaseBackend.php.
Referenced by Typo3DatabaseBackend\collectGarbage(), Typo3DatabaseBackend\findIdentifiersByTag(), Typo3DatabaseBackend\flush(), Typo3DatabaseBackend\flushByTag(), Typo3DatabaseBackend\get(), Typo3DatabaseBackend\getCacheTable(), Typo3DatabaseBackend\getTagsTable(), Typo3DatabaseBackend\has(), Typo3DatabaseBackend\remove(), and Typo3DatabaseBackend\set().
|
protected |
Definition at line 30 of file Typo3DatabaseBackend.php.
Referenced by Typo3DatabaseBackend\getCacheTable().
|
protected |
Definition at line 40 of file Typo3DatabaseBackend.php.
Referenced by Typo3DatabaseBackend\setCompression().
|
protected |
Definition at line 45 of file Typo3DatabaseBackend.php.
Referenced by Typo3DatabaseBackend\setCompressionLevel().
|
protected |
Definition at line 70 of file Typo3DatabaseBackend.php.
|
protected |
Definition at line 55 of file Typo3DatabaseBackend.php.
|
protected |
Definition at line 50 of file Typo3DatabaseBackend.php.
|
protected |
Definition at line 60 of file Typo3DatabaseBackend.php.
Referenced by Typo3DatabaseBackend\set().
|
protected |
Definition at line 65 of file Typo3DatabaseBackend.php.
|
protected |
Definition at line 80 of file Typo3DatabaseBackend.php.
|
protected |
Definition at line 75 of file Typo3DatabaseBackend.php.
|
protected |
Definition at line 35 of file Typo3DatabaseBackend.php.
Referenced by Typo3DatabaseBackend\getTagsTable(), and Typo3DatabaseBackend\initializeCommonReferences().
const FAKED_UNLIMITED_EXPIRE = 2145909600 |
Definition at line 26 of file Typo3DatabaseBackend.php.