TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Core\Cache\Backend\AbstractBackend Class Reference
Inheritance diagram for TYPO3\CMS\Core\Cache\Backend\AbstractBackend:
TYPO3\CMS\Core\Cache\Backend\BackendInterface t3lib_cache_backend_AbstractBackend TYPO3\CMS\Core\Cache\Backend\ApcBackend TYPO3\CMS\Core\Cache\Backend\EarlyClassLoaderBackend 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

Public Member Functions

 __construct ($context, array $options=array())
 
 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=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

This file is part of the TYPO3 CMS project.

It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the License, or any later version.

For the full copyright and license information, please read the LICENSE.txt file that was distributed with this source code.

The TYPO3 project - inspiring people to share! An abstract caching backend

This file is a backport from FLOW3

Author
Robert Lemke rober.nosp@m.t@ty.nosp@m.po3.o.nosp@m.rg
Karsten Dambekalns karst.nosp@m.en@t.nosp@m.ypo3..nosp@m.org
Ingo Renner ingo@.nosp@m.typo.nosp@m.3.org

Definition at line 26 of file AbstractBackend.php.

Constructor & Destructor Documentation

◆ __construct()

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

Constructs this backend

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

Definition at line 68 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
integer$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 89 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
integer$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 102 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

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

◆ $context

◆ $defaultLifetime

◆ DATETIME_EXPIRYTIME_UNLIMITED

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

Definition at line 28 of file AbstractBackend.php.

◆ UNLIMITED_LIFETIME

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

Definition at line 29 of file AbstractBackend.php.