TYPO3
7.6
|
Public Member Functions | |
__construct ($context, array $options=array()) | |
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 () | |
Public Member Functions inherited from AbstractBackend | |
__construct ($context, array $options=array()) | |
setCache (\TYPO3\CMS\Core\Cache\Frontend\FrontendInterface $cache) | |
setDefaultLifetime ($defaultLifetime) | |
Protected Member Functions | |
setIdentifierPrefix ($identifierPrefix) | |
getIdentifierPrefix () | |
getCurrentUserData () | |
getPathSite () | |
findTagsByIdentifier ($identifier) | |
addIdentifierToTags ($entryIdentifier, array $tags) | |
removeIdentifierFromAllTags ($entryIdentifier) | |
Protected Member Functions inherited from AbstractBackend | |
calculateExpiryTime ($lifetime=null) | |
Protected Attributes | |
$identifierPrefix | |
Protected Attributes inherited from AbstractBackend | |
$cache | |
$cacheIdentifier | |
$context | |
$defaultLifetime = 3600 | |
Additional Inherited Members | |
Public Attributes inherited from AbstractBackend | |
const | DATETIME_EXPIRYTIME_UNLIMITED = '9999-12-31T23:59:59+0000' |
const | UNLIMITED_LIFETIME = 0 |
A caching backend which stores cache entries by using APC.
This backend uses the following types of keys:
Each key is prepended with a prefix. By default prefix consists from two parts separated by underscore character and ends in yet another underscore character:
This file is a backport from FLOW3
Definition at line 40 of file ApcBackend.php.
__construct | ( | $context, | |
array | $options = array() |
||
) |
Constructs this backend
string | $context | FLOW3's application context |
array | $options | Configuration options - unused here |
\TYPO3\CMS\Core\Cache\Exception |
Definition at line 76 of file ApcBackend.php.
References AbstractBackend\$context.
|
protected |
Associates the identifier with the given tags
string | $entryIdentifier | |
array | $tags |
Definition at line 266 of file ApcBackend.php.
References ApcBackend\findIdentifiersByTag(), ApcBackend\findTagsByIdentifier(), and ApcBackend\getIdentifierPrefix().
Referenced by ApcBackend\set().
collectGarbage | ( | ) |
Does nothing, as APC does GC itself
Implements BackendInterface.
Definition at line 328 of file ApcBackend.php.
findIdentifiersByTag | ( | $tag | ) |
Finds and returns all cache entry identifiers which are tagged by the specified tag.
string | $tag | The tag to search for |
Implements TaggableBackendInterface.
Definition at line 204 of file ApcBackend.php.
References ApcBackend\getIdentifierPrefix().
Referenced by ApcBackend\addIdentifierToTags(), ApcBackend\flushByTag(), and ApcBackend\removeIdentifierFromAllTags().
|
protected |
Finds all tags for the given identifier. This function uses reverse tag index to search for tags.
string | $identifier | Identifier to find tags by |
Definition at line 222 of file ApcBackend.php.
References ApcBackend\getIdentifierPrefix().
Referenced by ApcBackend\addIdentifierToTags(), and ApcBackend\removeIdentifierFromAllTags().
flush | ( | ) |
Removes all cache entries of this cache.
\TYPO3\CMS\Core\Cache\Exception |
Implements BackendInterface.
Definition at line 236 of file ApcBackend.php.
References ApcBackend\flushByTag().
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 251 of file ApcBackend.php.
References ApcBackend\findIdentifiersByTag().
Referenced by ApcBackend\flush().
get | ( | $entryIdentifier | ) |
Loads data from the cache.
string | $entryIdentifier | An identifier which describes the cache entry to load |
Implements BackendInterface.
Definition at line 160 of file ApcBackend.php.
References ApcBackend\getIdentifierPrefix().
|
protected |
Returns the current user data with posix_getpwuid or a default structure when posix_getpwuid is not available.
Definition at line 107 of file ApcBackend.php.
Referenced by ApcBackend\setCache().
|
protected |
Retrieves the cache identifier prefix.
Definition at line 64 of file ApcBackend.php.
References ApcBackend\$identifierPrefix.
Referenced by ApcBackend\addIdentifierToTags(), ApcBackend\findIdentifiersByTag(), ApcBackend\findTagsByIdentifier(), ApcBackend\get(), ApcBackend\has(), ApcBackend\remove(), ApcBackend\removeIdentifierFromAllTags(), and ApcBackend\set().
|
protected |
Returns the PATH_site constant.
Definition at line 117 of file ApcBackend.php.
Referenced by ApcBackend\setCache().
has | ( | $entryIdentifier | ) |
Checks if a cache entry with the specified identifier exists.
string | $entryIdentifier | An identifier specifying the cache entry |
Implements BackendInterface.
Definition at line 174 of file ApcBackend.php.
References ApcBackend\getIdentifierPrefix().
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 |
Implements BackendInterface.
Definition at line 190 of file ApcBackend.php.
References ApcBackend\getIdentifierPrefix(), and ApcBackend\removeIdentifierFromAllTags().
|
protected |
Removes association of the identifier with the given tags
string | $entryIdentifier |
Definition at line 298 of file ApcBackend.php.
References ApcBackend\findIdentifiersByTag(), ApcBackend\findTagsByIdentifier(), and ApcBackend\getIdentifierPrefix().
Referenced by ApcBackend\remove(), and ApcBackend\set().
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 |
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 $data is not a string |
Implements BackendInterface.
Definition at line 134 of file ApcBackend.php.
References AbstractBackend\$cacheIdentifier, AbstractBackend\$defaultLifetime, ApcBackend\addIdentifierToTags(), ApcBackend\getIdentifierPrefix(), and ApcBackend\removeIdentifierFromAllTags().
setCache | ( | \TYPO3\CMS\Core\Cache\Frontend\FrontendInterface | $cache | ) |
Initializes the identifier prefix when setting the cache.
\TYPO3\CMS\Core\Cache\Frontend\FrontendInterface | $cache |
Implements BackendInterface.
Definition at line 93 of file ApcBackend.php.
References ApcBackend\getCurrentUserData(), ApcBackend\getPathSite(), and ApcBackend\setIdentifierPrefix().
|
protected |
Set the cache identifier prefix.
string | $identifierPrefix |
Definition at line 54 of file ApcBackend.php.
References ApcBackend\$identifierPrefix.
Referenced by ApcBackend\setCache().
|
protected |
Definition at line 47 of file ApcBackend.php.
Referenced by ApcBackend\getIdentifierPrefix(), and ApcBackend\setIdentifierPrefix().