Documentation

Cache
in package
implements ArrayAccess

Cache class

Tags
category

Pop

author

Nick Sagona, III dev@nolainteractive.com

copyright

Copyright (c) 2009-2021 NOLA Interactive, LLC. (http://www.nolainteractive.com)

license

http://www.popphp.org/license New BSD License

version
3.4.0

Interfaces, Classes and Traits

ArrayAccess

Table of Contents

$adapter  : AdapterInterface
Cache adapter
__construct()  : mixed
Constructor
__get()  : mixed
Magic get method to return an item from cache
__isset()  : bool
Determine if the item is in cache
__set()  : void
Magic set method to save an item in the cache
__unset()  : void
Delete value from cache
adapter()  : mixed
Get the adapter
clear()  : Cache
Clear all stored values from cache
deleteItem()  : Cache
Delete an item in cache
deleteItems()  : Cache
Delete items in cache
destroy()  : Cache
Destroy cache resource
getAvailableAdapters()  : array<string|int, mixed>
Determine available adapters
getItem()  : mixed
Get an item from cache
getItemTtl()  : int
Get item cache TTL
getTtl()  : int
Get global cache TTL
hasItem()  : mixed
Determine if the item is in cache
isAvailable()  : bool
Determine if an adapter is available
offsetExists()  : bool
ArrayAccess offsetExists
offsetGet()  : mixed
ArrayAccess offsetGet
offsetSet()  : void
ArrayAccess offsetSet
offsetUnset()  : void
ArrayAccess offsetUnset
saveItem()  : Cache
Save an item to cache
saveItems()  : Cache
Save items to cache

Properties

Methods

__get()

Magic get method to return an item from cache

public __get(string $name) : mixed
Parameters
$name : string
Return values
mixed

__isset()

Determine if the item is in cache

public __isset(string $name) : bool
Parameters
$name : string
Return values
bool

__set()

Magic set method to save an item in the cache

public __set(string $name, mixed $value) : void
Parameters
$name : string
$value : mixed
Tags
throws
Exception
Return values
void

__unset()

Delete value from cache

public __unset(string $name) : void
Parameters
$name : string
Tags
throws
Exception
Return values
void

adapter()

Get the adapter

public adapter() : mixed
Return values
mixed

clear()

Clear all stored values from cache

public clear() : Cache
Return values
Cache

deleteItem()

Delete an item in cache

public deleteItem(string $id) : Cache
Parameters
$id : string
Return values
Cache

deleteItems()

Delete items in cache

public deleteItems(array<string|int, mixed> $ids) : Cache
Parameters
$ids : array<string|int, mixed>
Return values
Cache

destroy()

Destroy cache resource

public destroy() : Cache
Return values
Cache

getAvailableAdapters()

Determine available adapters

public static getAvailableAdapters() : array<string|int, mixed>
Return values
array<string|int, mixed>

getItem()

Get an item from cache

public getItem(string $id) : mixed
Parameters
$id : string
Return values
mixed

getItemTtl()

Get item cache TTL

public getItemTtl(string $id) : int
Parameters
$id : string
Return values
int

getTtl()

Get global cache TTL

public getTtl() : int
Return values
int

hasItem()

Determine if the item is in cache

public hasItem(string $id) : mixed
Parameters
$id : string
Return values
mixed

isAvailable()

Determine if an adapter is available

public static isAvailable(string $adapter) : bool
Parameters
$adapter : string
Return values
bool

offsetExists()

ArrayAccess offsetExists

public offsetExists(mixed $offset) : bool
Parameters
$offset : mixed
Return values
bool

offsetGet()

ArrayAccess offsetGet

public offsetGet(mixed $offset) : mixed
Parameters
$offset : mixed
Return values
mixed

offsetSet()

ArrayAccess offsetSet

public offsetSet(mixed $offset, mixed $value) : void
Parameters
$offset : mixed
$value : mixed
Return values
void

offsetUnset()

ArrayAccess offsetUnset

public offsetUnset(mixed $offset) : void
Parameters
$offset : mixed
Return values
void

saveItem()

Save an item to cache

public saveItem(string $id, mixed $value[, int $ttl = null ]) : Cache
Parameters
$id : string
$value : mixed
$ttl : int = null
Return values
Cache

saveItems()

Save items to cache

public saveItems(array<string|int, mixed> $items) : Cache
Parameters
$items : array<string|int, mixed>
Return values
Cache

Search results