class ViewController extends CacheController

Joomla! Cache view type object

Properties

Cache $cache Cache object from CacheController
array $options Array of options from CacheController

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 = array())

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

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

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

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

Get the cached view data

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

Store data to cache by ID and group

Details

__construct( array $options)

Constructor

Parameters

array $options Array of options

mixed __call( string $name, array $arguments)

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 = array())

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 = '')

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

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

Get the cached view data

Parameters

object $view The view object to cache output for
string $method The method name of the view method to cache output for
string $id The cache data ID
boolean $wrkarounds True to enable workarounds.

Return Value

mixed Boolean false on no result, cached object otherwise

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

Store data to cache by ID and group

Parameters

mixed $data The data to store
string $id The cache data ID
string $group The cache data group
boolean $wrkarounds True to use wrkarounds

Return Value

boolean True if cache stored