CallbackController
Extends CacheControllerJoomla! Cache callback type object
since |
1.7.0 |
---|---|
package |
Joomla CMS |
Methods
__call
Magic method to proxy CacheController method calls to Cache
__call(string name, array arguments) : mixed
since |
1.7.0 |
---|
Arguments
- name
string
Name of the function- arguments
array
Array of arguments for the function
Response
mixed
__construct
Constructor
__construct(array options) : mixed
since |
1.7.0 |
---|
Arguments
- options
array
Array of options
Response
mixed
_makeId
Generate a callback cache ID
_makeId(mixed callback, array args) : string
since |
1.7.0 |
---|
Arguments
- callback
mixed
Callback to cache- args
array
Arguments to the callback method to cache
Response
string
MD5 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
since |
1.7.0 |
---|---|
deprecated |
5.0 Use the cache controller factory instead |
Arguments
- path
array|string
A path to search.
Response
array
An array with directory elements
get
Executes a cacheable callback if not found in cache else returns cached output and result
get(callable callback, array args = array(), mixed id = false, bool wrkarounds = false, array woptions = array()) : mixed
since |
1.7.0 |
---|
Arguments
- callback
callable
Callback or string shorthand for a callback- args
array
Callback arguments- id
mixed
Cache ID- wrkarounds
bool
True to use workarounds- woptions
array
Workaround options
Response
mixed
Result of the callback
getInstance
Returns a reference to a cache adapter object, always creating it
getInstance(string type = 'output', array options = array()) : \Joomla\CMS\Cache\CacheController
since |
1.7.0 |
---|---|
throws |
|
deprecated |
5.0 Use the cache controller factory instead |
Arguments
- type
string
The cache object type to instantiate; default is output.- options
array
Array of options
Response
\Joomla\CMS\Cache\CacheController
store
Store data to cache by ID and group
store(mixed data, string id, string group = null, bool wrkarounds = true) : bool
since |
4.0.0 |
---|
Arguments
- data
mixed
The data to store- id
string
The cache data ID- group
string
The cache data group- wrkarounds
bool
True to use wrkarounds
Response
bool
True if cache stored