ViewController

Extends \Joomla\CMS\Cache\CacheController

Joomla! Cache view type object

since

1.7.0

Methods

__call

Magic method to proxy CacheController method calls to Cache

__call(string $name, array $arguments) : mixed
inherited
since

1.7.0

Arguments

$name

stringName of the function

$arguments

arrayArray of arguments for the function

Response

mixed

__construct

Constructor

__construct(array $options) 
inherited
since

1.7.0

Arguments

$options

arrayArray of options

_makeId

Generate a view cache ID.

_makeId(object $view, string $method) : string
since

1.7.0

Arguments

$view

objectThe view object to cache output for

$method

stringThe method name to cache for the view object

Response

stringMD5 Hash

addIncludePath

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

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

1.7.0

deprecated

5.0 Use the cache controller factory instead

Arguments

$path

array|stringA path to search.

Response

arrayAn array with directory elements

get

Get the cached view data

get(object $view, string $method = 'display', mixed $id = false, boolean $wrkarounds = true) : boolean
since

1.7.0

Arguments

$view

objectThe view object to cache output for

$method

stringThe method name of the view method to cache output for

$id

mixedThe cache data ID

$wrkarounds

booleanTrue to enable workarounds.

Response

booleanTrue if the cache is hit (false else)

getInstance

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

getInstance(string $type = 'output', array $options = array()) : \Joomla\CMS\Cache\CacheController
inherited static deprecated
since

1.7.0

throws

\RuntimeException

deprecated

5.0 Use the cache controller factory instead

Arguments

$type

stringThe cache object type to instantiate; default is output.

$options

arrayArray of options

Response

\Joomla\CMS\Cache\CacheController

store

Store data to cache by ID and group

store(mixed $data, string $id, string $group = null, boolean $wrkarounds = true) : boolean
since

4.0.0

Arguments

$data

mixedThe data to store

$id

stringThe cache data ID

$group

stringThe cache data group

$wrkarounds

booleanTrue to use wrkarounds

Response

booleanTrue if cache stored

Properties

cache

Cache object

inherited
since

1.7.0

Type(s)

\Joomla\CMS\Cache\Cache

options

Array of options

inherited
since

1.7.0

Type(s)

array