Runtime

Extends \Joomla\Cache\Cache

Runtime memory cache driver.

deprecated
since

1.0

deprecated

The joomla/cache package is deprecated

Methods

__construct

Constructor.

__construct(mixed $options = array()) 
inherited
since

1.0

throws

\RuntimeException

Arguments

$options

mixedAn options array, or an object that implements \ArrayAccess

clear

This will wipe out the entire cache's keys

clear() : boolean
inherited abstract
since

1.0

Response

booleanThe result of the clear operation.

exists

Method to determine whether a storage entry has been set for a key.

exists(string $key) : boolean
inherited abstract
since

1.0

Arguments

$key

stringThe storage entry identifier.

Response

boolean

get

Get cached data by id. If the cached data has expired then the cached data will be removed and false will be returned.

get(string $key) : \Psr\Cache\CacheItemInterface
inherited abstract
since

1.0

Arguments

$key

stringThe cache data id.

Response

\Psr\Cache\CacheItemInterfaceCached data string if it exists.

getMultiple

Obtain multiple CacheItems by their unique keys.

getMultiple(array $keys) : array
inherited
since

1.0

Arguments

$keys

arrayA list of keys that can obtained in a single operation.

Response

arrayAn associative array of CacheItem objects keyed on the cache key.

getOption

Get an option from the Cache instance.

getOption(string $key) : mixed
inherited
since

1.0

Arguments

$key

stringThe name of the option to get.

Response

mixedThe option value.

remove

Delete a cached data entry by id.

remove(string $key) : boolean
inherited abstract
since

1.0

Arguments

$key

stringThe cache data id.

Response

boolean

removeMultiple

Remove multiple cache items in a single operation.

removeMultiple(array $keys) : array
inherited
since

1.0

Arguments

$keys

arrayThe array of keys to be removed.

Response

arrayAn associative array of 'key' => result, elements. Each array row has the key being deleted and the result of that operation. The result will be a boolean of true or false representing if the cache item was removed or not

set

Store the cached data by id.

set(string $key, mixed $data, integer $ttl = null) : boolean
inherited abstract
since

1.0

Arguments

$key

stringThe cache data id

$data

mixedThe data to store

$ttl

integerThe number of seconds before the stored data expires.

Response

boolean

setMultiple

Persisting a set of key => value pairs in the cache, with an optional TTL.

setMultiple(array $items, null|integer $ttl = null) : boolean
inherited
since

1.0

Arguments

$items

arrayAn array of key => value pairs for a multiple-set operation.

$ttl

null|integerOptional. The TTL value of this item. If no value is sent and the driver supports TTL then the library may set a default value for it or let the driver take care of that.

Response

booleanThe result of the multiple-set operation.

setOption

Set an option for the Cache instance.

setOption(string $key, mixed $value) : \Joomla\Cache\Cache
inherited
since

1.0

Arguments

$key

stringThe name of the option to set.

$value

mixedThe option value to set.

Response

\Joomla\Cache\CacheThis object for method chaining.

Properties

store

The runtime cache storage array.

static
since

1.0

Type(s)

array

options

The options for the cache object.

inherited
since

1.0

Type(s)

\ArrayAccess