Since: 1.7.0

class CacheController mixin Cache

Public cache handler

Properties

Cache Since: 1.7.0
$cache

Cache object

array Since: 1.7.0
$options

Array of options

Methods

__construct(array $options)

Constructor

mixed
__call(string $name, array $arguments)

Magic method to proxy CacheController method calls to Cache

static CacheController
getInstance(string $type = 'output', array $options = []) deprecated

Returns a reference to a cache adapter object, always creating it

static array
addIncludePath(array|string $path = '') deprecated

Add a directory where Cache should search for controllers. You may either pass a string or an array of directories.

Details

__construct(array $options)

Since: 1.7.0

Constructor

Parameters

array $options

Array of options

mixed __call(string $name, array $arguments)

Since: 1.7.0

Magic method to proxy CacheController method calls to Cache

Parameters

string $name

Name of the function

array $arguments

Array of arguments for the function

Return Value

mixed

static CacheController getInstance(string $type = 'output', array $options = []) deprecated

Since: 1.7.0

deprecated 4.2 will be removed in 6.0 Use the cache controller factory instead Example: Factory::getContainer()->get(CacheControllerFactoryInterface::class)->createCacheController($type, $options);

Returns a reference to a cache adapter object, always creating it

Parameters

string $type

The cache object type to instantiate; default is output.

array $options

Array of options

Return Value

CacheController

Exceptions

RuntimeException

static array addIncludePath(array|string $path = '') deprecated

Since: 1.7.0

deprecated 4.2 will be removed in 6.0 Use the cache controller factory instead Example: Factory::getContainer()->get(CacheControllerFactoryInterface::class)->createCacheController($type, $options);

Add a directory where Cache should search for controllers. You may either pass a string or an array of directories.

Parameters

array|string $path

A path to search.

Return Value

array

An array with directory elements