TYPO3  7.6
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
AbstractBackend Class Reference
Inheritance diagram for AbstractBackend:
BackendInterface ApcBackend MemcachedBackend NullBackend PdoBackend RedisBackend SimpleFileBackend TransientMemoryBackend Typo3DatabaseBackend WincacheBackend XcacheBackend

Public Member Functions

 __construct ($context, array $options=array())
 
 setCache (\TYPO3\CMS\Core\Cache\Frontend\FrontendInterface $cache)
 
 setDefaultLifetime ($defaultLifetime)
 
- Public Member Functions inherited from BackendInterface
 set ($entryIdentifier, $data, array $tags=array(), $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 core/Classes/Cache/Backend/AbstractBackend.php.

Constructor & Destructor Documentation

__construct (   $context,
array  $options = array() 
)

Constructs this backend

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

Definition at line 65 of file core/Classes/Cache/Backend/AbstractBackend.php.

References AbstractBackend\$context.

Member Function Documentation

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 core/Classes/Cache/Backend/AbstractBackend.php.

References AbstractBackend\$defaultLifetime.

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 BackendInterface.

Definition at line 87 of file core/Classes/Cache/Backend/AbstractBackend.php.

References AbstractBackend\$cache.

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
\InvalidArgumentException

Definition at line 101 of file core/Classes/Cache/Backend/AbstractBackend.php.

References AbstractBackend\$defaultLifetime.

Member Data Documentation

$cache
protected
$cacheIdentifier
protected
$context
protected
$defaultLifetime = 3600
protected
const DATETIME_EXPIRYTIME_UNLIMITED = '9999-12-31T23:59:59+0000'
const UNLIMITED_LIFETIME = 0