TYPO3  7.6
Public Member Functions | Protected Attributes | List of all members
CacheFactory Class Reference
Inheritance diagram for CacheFactory:
SingletonInterface

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 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 singleton

Definition at line 26 of file CacheFactory.php.

Constructor & Destructor Documentation

__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 51 of file CacheFactory.php.

References CacheFactory\$cacheManager, and CacheFactory\$context.

Member Function Documentation

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
\TYPO3\CMS\Core\Cache\Exception\InvalidBackendExceptionif the cache backend is not valid
\TYPO3\CMS\Core\Cache\Exception\InvalidCacheExceptionif the cache frontend is not valid

Definition at line 71 of file CacheFactory.php.

Member Data Documentation

$cacheManager
protected

Definition at line 43 of file CacheFactory.php.

Referenced by CacheFactory\__construct().

$context
protected

Definition at line 36 of file CacheFactory.php.

Referenced by CacheFactory\__construct().