public
|
#
__construct( array $options )
Constructor
Parameters
- $options
array - $options Cache options
Since
11.1
|
public static
JCacheController
|
#
getInstance( string $type = 'output', array $options = array() )
Returns a reference to a cache adapter object, always creating it
Returns a reference to a cache adapter object, always creating it
Parameters
- $type
string - $type The cache object type to instantiate
- $options
array - $options The array of options
Returns
Since
11.1
|
public static
array
|
#
getStores( )
Get the storage handlers
Returns
array
Since
11.1
|
public
|
#
setCaching( boolean $enabled )
Set caching enabled state
Set caching enabled state
Parameters
- $enabled
boolean - $enabled True to enable caching
Since
11.1
|
public
boolean
|
#
getCaching( )
Get caching state
Returns
boolean
Since
11.1
|
public
|
#
setLifeTime( integer $lt )
Set cache lifetime
Parameters
- $lt
integer - $lt Cache lifetime
Since
11.1
|
public
boolean
|
#
contains( string $id, string $group = null )
Check if the cache contains data stored by ID and group
Check if the cache contains data stored by ID and group
Parameters
- $id
string - $id The cache data ID
- $group
string - $group The cache data group
Returns
boolean
Since
3.7.0
|
public
mixed
|
#
get( string $id, string $group = null )
Get cached data by ID and group
Get cached data by ID and group
Parameters
- $id
string - $id The cache data ID
- $group
string - $group The cache data group
Returns
mixed - Boolean false on failure or a cached data object
Since
11.1
|
public
mixed
|
#
getAll( )
Get a list of all cached data
Get a list of all cached data
Returns
mixed - Boolean false on failure or an object with a list of cache groups and data
Since
11.1
|
public
boolean
|
#
store( mixed $data, string $id, string $group = null )
Store the cached data by ID and group
Store the cached data by ID and group
Parameters
- $data
mixed - $data The data to store
- $id
string - $id The cache data ID
- $group
string - $group The cache data group
Returns
boolean
Since
11.1
|
public
boolean
|
#
remove( string $id, string $group = null )
Remove a cached data entry by ID and group
Remove a cached data entry by ID and group
Parameters
- $id
string - $id The cache data ID
- $group
string - $group The cache data group
Returns
boolean
Since
11.1
|
public
boolean
|
#
clean( string $group = null, string $mode = 'group' )
Clean cache for a group given a mode.
Clean cache for a group given a mode.
group mode : cleans all cache in the group notgroup mode : cleans all cache
not in the group
Parameters
- $group
string - $group The cache data group
- $mode
string - $mode The mode for cleaning cache [group|notgroup]
Returns
boolean - True on success, false otherwise
Since
11.1
|
public
boolean
|
#
gc( )
Garbage collect expired cache data
Garbage collect expired cache data
Returns
boolean
Since
11.1
|
public
stdClass
|
#
lock( string $id, string $group = null, string $locktime = null )
Set lock flag on cached item
Set lock flag on cached item
Parameters
- $id
string - $id The cache data ID
- $group
string - $group The cache data group
- $locktime
string - $locktime The default locktime for locking the cache.
Returns
stdClass
- Object with properties of lock and locklooped
Since
11.1
|
public
boolean
|
#
unlock( string $id, string $group = null )
Unset lock flag on cached item
Unset lock flag on cached item
Parameters
- $id
string - $id The cache data ID
- $group
string - $group The cache data group
Returns
boolean
Since
11.1
|
public
JCacheStorage
&
|
#
_getStorage( )
Get the cache storage handler
Get the cache storage handler
Returns
Since
11.1
|
public static
string
|
#
getWorkarounds( string $data, array $options = array() )
Perform workarounds on retrieved cached data
Perform workarounds on retrieved cached data
Parameters
- $data
string - $data Cached data
- $options
array - $options Array of options
Returns
string - Body of cached data
Since
11.1
|
public static
string
|
#
setWorkarounds( string $data, array $options = array() )
Create workarounds for data to be cached
Create workarounds for data to be cached
Parameters
- $data
string - $data Cached data
- $options
array - $options Array of options
Returns
string - Data to be cached
Since
11.1
|
public static
string
|
#
makeId( )
Create a safe ID for cached data from URL parameters
Create a safe ID for cached data from URL parameters
Returns
string - MD5 encoded cache ID
Since
11.1
|
public static
string
|
#
getPlatformPrefix( )
Set a prefix cache key if device calls for separate caching
Set a prefix cache key if device calls for separate caching
Returns
string
Since
3.5
|
public static
array
|
#
addIncludePath( array|string $path = '' )
Add a directory where JCache should search for handlers. You may either pass
a string or an array of directories.
Add a directory where JCache should search for handlers. You may either pass
a string or an array of directories.
Parameters
- $path
array|string - $path A path to search.
Returns
array - An array with directory elements
Since
11.1
|