\Pop\CacheCache

Cache class

Summary

Methods
Properties
Constants
__construct()
getAvailableAdapters()
isAvailable()
adapter()
getTtl()
getItemTtl()
saveItem()
saveItems()
getItem()
hasItem()
deleteItem()
deleteItems()
clear()
destroy()
__get()
__set()
__isset()
__unset()
offsetExists()
offsetGet()
offsetSet()
offsetUnset()
No public properties found
No constants found
No protected methods found
$adapter
N/A
No private methods found
No private properties found
N/A

Properties

Methods

getAvailableAdapters()

getAvailableAdapters() : array

Determine available adapters

Returns

array

isAvailable()

isAvailable(string  $adapter) : boolean

Determine if an adapter is available

Parameters

string $adapter

Returns

boolean

adapter()

adapter() : mixed

Get the adapter

Returns

mixed

getTtl()

getTtl() : integer

Get global cache TTL

Returns

integer

getItemTtl()

getItemTtl(string  $id) : integer

Get item cache TTL

Parameters

string $id

Returns

integer

saveItem()

saveItem(string  $id, mixed  $value, integer  $ttl = null) : \Pop\Cache\Cache

Save an item to cache

Parameters

string $id
mixed $value
integer $ttl

Returns

\Pop\Cache\Cache

saveItems()

saveItems(array  $items) : \Pop\Cache\Cache

Save items to cache

Parameters

array $items

Returns

\Pop\Cache\Cache

getItem()

getItem(string  $id) : mixed

Get an item from cache

Parameters

string $id

Returns

mixed

hasItem()

hasItem(string  $id) : mixed

Determine if the item is in cache

Parameters

string $id

Returns

mixed

deleteItem()

deleteItem(string  $id) : \Pop\Cache\Cache

Delete an item in cache

Parameters

string $id

Returns

\Pop\Cache\Cache

deleteItems()

deleteItems(array  $ids) : \Pop\Cache\Cache

Delete items in cache

Parameters

array $ids

Returns

\Pop\Cache\Cache

clear()

clear() : \Pop\Cache\Cache

Clear all stored values from cache

Returns

\Pop\Cache\Cache

destroy()

destroy() : \Pop\Cache\Cache

Destroy cache resource

Returns

\Pop\Cache\Cache

__get()

__get(string  $name) : mixed

Magic get method to return an item from cache

Parameters

string $name

Returns

mixed

__set()

__set(string  $name, mixed  $value) : void

Magic set method to save an item in the cache

Parameters

string $name
mixed $value

Throws

\Pop\Cache\Exception

__isset()

__isset(string  $name) : boolean

Determine if the item is in cache

Parameters

string $name

Returns

boolean

__unset()

__unset(string  $name) : void

Delete value from cache

Parameters

string $name

Throws

\Pop\Cache\Exception

offsetExists()

offsetExists(mixed  $offset) : boolean

ArrayAccess offsetExists

Parameters

mixed $offset

Returns

boolean

offsetGet()

offsetGet(mixed  $offset) : mixed

ArrayAccess offsetGet

Parameters

mixed $offset

Returns

mixed

offsetSet()

offsetSet(mixed  $offset, mixed  $value) : void

ArrayAccess offsetSet

Parameters

mixed $offset
mixed $value

offsetUnset()

offsetUnset(mixed  $offset) : void

ArrayAccess offsetUnset

Parameters

mixed $offset