TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Core\Cache\Backend\AbstractBackend Class Reference
Inheritance diagram for TYPO3\CMS\Core\Cache\Backend\AbstractBackend:
TYPO3\CMS\Core\Cache\Backend\BackendInterface TYPO3\CMS\Core\Cache\Backend\ApcBackend TYPO3\CMS\Core\Cache\Backend\ApcuBackend 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\Tests\Unit\Cache\Backend\Fixtures\ConcreteBackendFixture

Public Member Functions

 __construct ($context, array $options=[])
 
 setCache (\TYPO3\CMS\Core\Cache\Frontend\FrontendInterface $cache)
 
 setDefaultLifetime ($defaultLifetime)
 
- Public Member Functions inherited from TYPO3\CMS\Core\Cache\Backend\BackendInterface
 set ($entryIdentifier, $data, array $tags=[], $lifetime=null)
 
 get ($entryIdentifier)
 
 has ($entryIdentifier)
 
 remove ($entryIdentifier)
 
 flush ()
 
 collectGarbage ()
 

Public Attributes

const DATETIME_EXPIRYTIME_UNLIMITED = '9999-12-31T23:59:59+0000'
 
const UNLIMITED_LIFETIME = 0
 

Protected Member Functions

 calculateExpiryTime ($lifetime=null)
 

Protected Attributes

 $cache
 
 $cacheIdentifier
 
 $context
 
 $defaultLifetime = 3600
 

Detailed Description

An abstract caching backend

This file is a backport from FLOW3

Definition at line 23 of file AbstractBackend.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Cache\Backend\AbstractBackend::__construct (   $context,
array  $options = [] 
)

Constructs this backend

Parameters
string$contextFLOW3's application context
array$optionsConfiguration options - depends on the actual backend
Exceptions

Definition at line 65 of file AbstractBackend.php.

References TYPO3\CMS\Core\Cache\Backend\AbstractBackend\$context.

Member Function Documentation

◆ calculateExpiryTime()

TYPO3\CMS\Core\Cache\Backend\AbstractBackend::calculateExpiryTime (   $lifetime = null)
protected

Calculates the expiry time by the given lifetime. If no lifetime is specified, the default lifetime is used.

Parameters
int$lifetimeThe lifetime in seconds
Returns
The expiry time

Definition at line 116 of file AbstractBackend.php.

References TYPO3\CMS\Core\Cache\Backend\AbstractBackend\$defaultLifetime.

◆ setCache()

TYPO3\CMS\Core\Cache\Backend\AbstractBackend::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

Implements TYPO3\CMS\Core\Cache\Backend\BackendInterface.

Definition at line 87 of file AbstractBackend.php.

References TYPO3\CMS\Core\Cache\Backend\AbstractBackend\$cache.

◆ setDefaultLifetime()

TYPO3\CMS\Core\Cache\Backend\AbstractBackend::setDefaultLifetime (   $defaultLifetime)

Sets the default lifetime for this cache backend

Parameters
int$defaultLifetimeDefault lifetime of this cache backend in seconds. If NULL is specified, the default lifetime is used. "0" means unlimited liftime.
Returns
void
Exceptions

Definition at line 101 of file AbstractBackend.php.

References TYPO3\CMS\Core\Cache\Backend\AbstractBackend\$defaultLifetime.

Member Data Documentation

◆ $cache

TYPO3\CMS\Core\Cache\Backend\AbstractBackend::$cache
protected

◆ $cacheIdentifier

◆ $context

◆ $defaultLifetime

◆ DATETIME_EXPIRYTIME_UNLIMITED

const TYPO3\CMS\Core\Cache\Backend\AbstractBackend::DATETIME_EXPIRYTIME_UNLIMITED = '9999-12-31T23:59:59+0000'

Definition at line 25 of file AbstractBackend.php.

◆ UNLIMITED_LIFETIME

const TYPO3\CMS\Core\Cache\Backend\AbstractBackend::UNLIMITED_LIFETIME = 0

Definition at line 26 of file AbstractBackend.php.