interface CacheFactoryInterface (View source)

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.

Methods

create(string $cacheIdentifier, string $cacheObjectName, string $backendObjectName, array $backendOptions = [])

Factory method which creates the specified cache along with the specified kind of backend.

Details

FrontendInterface create(string $cacheIdentifier, string $cacheObjectName, string $backendObjectName, array $backendOptions = [])

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 $cacheIdentifier

The name / identifier of the cache to create

string $cacheObjectName

Object name of the cache frontend

string $backendObjectName

Object name of the cache backend

array $backendOptions

(optional) Array of backend options

Return Value

FrontendInterface

The created cache frontend

Exceptions

InvalidBackendException
InvalidCacheException