JCacheControllerPage
Extends \JCacheControllerJoomla! Cache page type object
package |
Joomla.Platform |
---|---|
subpackage |
Cache |
since |
11.1 |
Methods
__call
Magic method to proxy JCacheControllerMethods
__call(string $name, array $arguments) : mixed
since |
11.1 |
---|
Arguments
- $name
string
Name of the function- $arguments
array
Array of arguments for the function
Response
mixed
__construct
Constructor
__construct(array $options)
since |
11.1 |
---|
Arguments
- $options
array
Array of options
_makeId
Generate a page cache id
_makeId() : string
since |
11.1 |
---|---|
todo |
Discuss whether this should be coupled to a data hash or a request hash ... perhaps hashed with a serialized request |
Response
string
MD5 Hash : page cache id
_noChange
There is no change in page data so send an unmodified header and die gracefully
_noChange() : void
since |
11.1 |
---|
_setEtag
Set the ETag header in the response
_setEtag(string $etag) : void
since |
11.1 |
---|
Arguments
- $etag
string
The entity tag (etag) to set
addIncludePath
Add a directory where JCache should search for controllers. You may either pass a string or an array of directories.
addIncludePath(string $path = '') : array
since |
11.1 |
---|
Arguments
- $path
string
A path to search.
Response
array
An array with directory elements
get
Get stored cached data by id and group
get(string $id, string $group = null) : mixed
since |
11.1 |
---|
Arguments
- $id
string
The cache data id- $group
string
The cache data group
Response
mixed
False on no result, cached object otherwise
getInstance
Returns a reference to a cache adapter object, always creating it
getInstance(string $type = 'output', array $options = array()) : \JCache
since |
11.1 |
---|
Arguments
- $type
string
The cache object type to instantiate; default is output.- $options
array
Array of options
Response
\JCache
A JCache object
setCaching
Set caching enabled state
setCaching(boolean $enabled) : void
since |
11.1 |
---|
Arguments
- $enabled
boolean
True to enable caching
setLifeTime
Set cache lifetime
setLifeTime(integer $lt) : void
since |
11.1 |
---|
Arguments
- $lt
integer
Cache lifetime
store
Store data to cache by id and group
store(mixed $data, string $id, string $group = null) : boolean
since |
11.1 |
---|
Arguments
- $data
mixed
The data to store- $id
string
The cache data id- $group
string
The cache data group
Response
boolean
True if cache was stored
Properties
_id
ID property for the cache page object.
since |
11.1 |
---|
Type(s)
integer
_group
Cache group
since |
11.1 |
---|
Type(s)
string
_locktest
Cache lock test
since |
11.1 |
---|
Type(s)
object
options
Array of options
since |
11.1 |
---|
Type(s)
array