TYPO3
7.6
|
Public Member Functions | |
initializeObject () | |
setCache (\TYPO3\CMS\Core\Cache\Frontend\FrontendInterface $cache) | |
setCacheDirectory ($cacheDirectory) | |
getCacheDirectory () | |
set ($entryIdentifier, $data, array $tags=array(), $lifetime=null) | |
get ($entryIdentifier) | |
has ($entryIdentifier) | |
remove ($entryIdentifier) | |
flush () | |
collectGarbage () | |
requireOnce ($entryIdentifier) | |
Public Member Functions inherited from AbstractBackend | |
__construct ($context, array $options=array()) | |
setCache (\TYPO3\CMS\Core\Cache\Frontend\FrontendInterface $cache) | |
setDefaultLifetime ($defaultLifetime) | |
Public Attributes | |
const | SEPARATOR = '^' |
const | EXPIRYTIME_FORMAT = 'YmdHis' |
const | EXPIRYTIME_LENGTH = 14 |
const | DATASIZE_DIGITS = 10 |
Public Attributes inherited from AbstractBackend | |
const | DATETIME_EXPIRYTIME_UNLIMITED = '9999-12-31T23:59:59+0000' |
const | UNLIMITED_LIFETIME = 0 |
Protected Member Functions | |
createFinalCacheDirectory ($finalCacheDirectory) | |
isCacheFileExpired ($cacheEntryPathAndFilename) | |
findCacheFilesByIdentifier ($entryIdentifier) | |
Protected Member Functions inherited from AbstractBackend | |
calculateExpiryTime ($lifetime=null) | |
Protected Attributes | |
$cacheDirectory = '' | |
$temporaryCacheDirectory = '' | |
$cacheEntryFileExtension = '' | |
$cacheEntryIdentifiers = array() | |
$frozen = false | |
$useIgBinary = false | |
Protected Attributes inherited from AbstractBackend | |
$cache | |
$cacheIdentifier | |
$context | |
$defaultLifetime = 3600 | |
A caching backend which stores cache entries in files, but does not support or care about expiry times and tags.
Definition at line 24 of file SimpleFileBackend.php.
collectGarbage | ( | ) |
Not necessary
Implements BackendInterface.
Definition at line 352 of file SimpleFileBackend.php.
|
protected |
Create the final cache directory if it does not exist. This method exists in TYPO3 v4 only.
string | $finalCacheDirectory | Absolute path to final cache directory |
\TYPO3\CMS\Core\Cache\Exception | If directory is not writable after creation |
Definition at line 201 of file SimpleFileBackend.php.
Referenced by SimpleFileBackend\setCache().
|
protected |
Tries to find the cache entry for the specified identifier.
string | $entryIdentifier | The cache entry identifier |
Definition at line 362 of file SimpleFileBackend.php.
References SimpleFileBackend\$cacheEntryFileExtension.
flush | ( | ) |
Removes all cache entries of this cache.
Implements BackendInterface.
Definition at line 328 of file SimpleFileBackend.php.
get | ( | $entryIdentifier | ) |
Loads data from a cache file.
string | $entryIdentifier | An identifier which describes the cache entry to load |
\InvalidArgumentException | If identifier is invalid |
Implements BackendInterface.
Definition at line 269 of file SimpleFileBackend.php.
References SimpleFileBackend\$cacheEntryFileExtension.
getCacheDirectory | ( | ) |
Returns the directory where the cache files are stored
Definition at line 219 of file SimpleFileBackend.php.
References SimpleFileBackend\$cacheDirectory.
has | ( | $entryIdentifier | ) |
Checks if a cache entry with the specified identifier exists.
string | $entryIdentifier |
\InvalidArgumentException |
Implements BackendInterface.
Definition at line 289 of file SimpleFileBackend.php.
initializeObject | ( | ) |
|
protected |
Checks if the given cache entry files are still valid or if their lifetime has exceeded.
string | $cacheEntryPathAndFilename |
Definition at line 341 of file SimpleFileBackend.php.
remove | ( | $entryIdentifier | ) |
Removes all cache entries matching the specified identifier. Usually this only affects one entry.
string | $entryIdentifier | Specifies the cache entry to remove |
\InvalidArgumentException |
Implements BackendInterface.
Definition at line 306 of file SimpleFileBackend.php.
requireOnce | ( | $entryIdentifier | ) |
Loads PHP code from the cache and require_onces it right away.
string | $entryIdentifier | An identifier which describes the cache entry to load |
\InvalidArgumentException |
Implements PhpCapableBackendInterface.
Definition at line 376 of file SimpleFileBackend.php.
References SimpleFileBackend\$cacheEntryFileExtension.
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 lifetime. |
\TYPO3\CMS\Core\Cache\Exception | if the directory does not exist or is not writable or exceeds the maximum allowed path length, or if no cache frontend has been set. |
\TYPO3\CMS\Core\Cache\Exception\InvalidDataException | if the data to bes stored is not a string. |
\InvalidArgumentException |
Implements BackendInterface.
Definition at line 237 of file SimpleFileBackend.php.
References SimpleFileBackend\$cacheEntryFileExtension, StringUtility\getUniqueId(), and GeneralUtility\makeInstance().
setCache | ( | \TYPO3\CMS\Core\Cache\Frontend\FrontendInterface | $cache | ) |
Sets a reference to the cache frontend which uses this backend and initializes the default cache directory.
TYPO3 v4 note: This method is different between TYPO3 v4 and FLOW3 because the Environment class to get the path to a temporary directory does not exist in v4.
\TYPO3\CMS\Core\Cache\Frontend\FrontendInterface | $cache | The cache frontend |
\TYPO3\CMS\Core\Cache\Exception |
Implements BackendInterface.
Definition at line 95 of file SimpleFileBackend.php.
References SimpleFileBackend\$temporaryCacheDirectory, SimpleFileBackend\createFinalCacheDirectory(), and GeneralUtility\getMaximumPathLength().
setCacheDirectory | ( | $cacheDirectory | ) |
Sets the directory where the cache files are stored. By default it is assumed that the directory is below the TYPO3_DOCUMENT_ROOT. However, an absolute path can be selected, too.
This method does not exist in FLOW3 anymore, but it is needed in TYPO3 v4 to enable a cache path outside of document root. The final cache path is checked and created in createFinalCachDirectory(), called by setCache() method, which is done after the cacheDirectory option was handled.
string | $cacheDirectory | The cache base directory. If a relative path |
\TYPO3\CMS\Core\Cache\Exception | if the directory is not within allowed |
Definition at line 133 of file SimpleFileBackend.php.
References SimpleFileBackend\$cacheDirectory, and GeneralUtility\isFirstPartOfStr().
|
protected |
Definition at line 35 of file SimpleFileBackend.php.
Referenced by SimpleFileBackend\getCacheDirectory(), and SimpleFileBackend\setCacheDirectory().
|
protected |
Definition at line 53 of file SimpleFileBackend.php.
Referenced by SimpleFileBackend\findCacheFilesByIdentifier(), SimpleFileBackend\get(), SimpleFileBackend\requireOnce(), and SimpleFileBackend\set().
|
protected |
Definition at line 58 of file SimpleFileBackend.php.
|
protected |
Definition at line 63 of file SimpleFileBackend.php.
|
protected |
Definition at line 46 of file SimpleFileBackend.php.
Referenced by SimpleFileBackend\setCache().
|
protected |
Definition at line 71 of file SimpleFileBackend.php.
const DATASIZE_DIGITS = 10 |
Definition at line 29 of file SimpleFileBackend.php.
const EXPIRYTIME_FORMAT = 'YmdHis' |
Definition at line 27 of file SimpleFileBackend.php.
const EXPIRYTIME_LENGTH = 14 |
Definition at line 28 of file SimpleFileBackend.php.
const SEPARATOR = '^' |
Definition at line 26 of file SimpleFileBackend.php.