TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Core\Cache\CacheFactory Class Reference
Inheritance diagram for TYPO3\CMS\Core\Cache\CacheFactory:
TYPO3\CMS\Core\SingletonInterface t3lib_cache_Factory

Public Member Functions

 __construct ($context, \TYPO3\CMS\Core\Cache\CacheManager $cacheManager)
 
 create ($cacheIdentifier, $cacheObjectName, $backendObjectName, array $backendOptions=array())
 

Protected Attributes

 $context
 
 $cacheManager
 

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! This cache factory takes care of instantiating a cache frontend and injecting a certain cache backend. After creation of the new cache, the cache object is registered at the cache manager.

This file is a backport from FLOW3

Author
Robert Lemke rober.nosp@m.t@ty.nosp@m.po3.o.nosp@m.rg singleton

Definition at line 27 of file CacheFactory.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Cache\CacheFactory::__construct (   $context,
\TYPO3\CMS\Core\Cache\CacheManager  $cacheManager 
)

Constructs this cache factory

Parameters
string$contextThe current FLOW3 context
\TYPO3\CMS\Core\Cache\CacheManager$cacheManagerThe cache manager

Definition at line 52 of file CacheFactory.php.

References TYPO3\CMS\Core\Cache\CacheFactory\$cacheManager, and TYPO3\CMS\Core\Cache\CacheFactory\$context.

Member Function Documentation

◆ create()

TYPO3\CMS\Core\Cache\CacheFactory::create (   $cacheIdentifier,
  $cacheObjectName,
  $backendObjectName,
array  $backendOptions = array() 
)

Factory method which creates the specified cache along with the specified kind of backend. After creating the cache, it will be registered at the cache manager.

Parameters
string$cacheIdentifierThe name / identifier of the cache to create
string$cacheObjectNameObject name of the cache frontend
string$backendObjectNameObject name of the cache backend
array$backendOptions(optional) Array of backend options
Returns
The created cache frontend
Exceptions

Definition at line 71 of file CacheFactory.php.

References $backend.

Member Data Documentation

◆ $cacheManager

TYPO3\CMS\Core\Cache\CacheFactory::$cacheManager
protected

Definition at line 44 of file CacheFactory.php.

Referenced by TYPO3\CMS\Core\Cache\CacheFactory\__construct().

◆ $context

TYPO3\CMS\Core\Cache\CacheFactory::$context
protected

Definition at line 37 of file CacheFactory.php.

Referenced by TYPO3\CMS\Core\Cache\CacheFactory\__construct().