Apc
extends AbstractAdapter
in package
APC cache adapter class
Tags
Table of Contents
Properties
- $ttl : int
- Global time-to-live
Methods
- __construct() : mixed
- Constructor
- clear() : Apc
- Clear all stored values from cache
- deleteItem() : Apc
- Delete a value in cache
- destroy() : Apc
- Destroy cache resource
- getInfo() : array<string|int, mixed>
- Method to get the current APC info.
- getItem() : mixed
- Get an item from cache
- getItemTtl() : int
- Get the time-to-live for an item in cache
- getTtl() : int
- Get the global time-to-live for the cache object
- hasItem() : bool
- Determine if the item exist in cache
- saveItem() : Apc
- Save an item to cache
- setTtl() : AbstractAdapter
- Set the global time-to-live for the cache adapter
Properties
$ttl
Global time-to-live
protected
int
$ttl
= 0
Methods
__construct()
Constructor
public
__construct([int $ttl = 0 ]) : mixed
Instantiate the APC cache object
Parameters
- $ttl : int = 0
Tags
clear()
Clear all stored values from cache
public
clear() : Apc
Return values
ApcdeleteItem()
Delete a value in cache
public
deleteItem(string $id) : Apc
Parameters
- $id : string
Return values
Apcdestroy()
Destroy cache resource
public
destroy() : Apc
Return values
ApcgetInfo()
Method to get the current APC info.
public
getInfo() : array<string|int, mixed>
Return values
array<string|int, mixed>getItem()
Get an item from cache
public
getItem(string $id) : mixed
Parameters
- $id : string
getItemTtl()
Get the time-to-live for an item in cache
public
getItemTtl(string $id) : int
Parameters
- $id : string
Return values
intgetTtl()
Get the global time-to-live for the cache object
public
getTtl() : int
Return values
inthasItem()
Determine if the item exist in cache
public
hasItem(string $id) : bool
Parameters
- $id : string
Return values
boolsaveItem()
Save an item to cache
public
saveItem(string $id, mixed $value[, int|null $ttl = null ]) : Apc
Parameters
- $id : string
- $value : mixed
- $ttl : int|null = null
Return values
ApcsetTtl()
Set the global time-to-live for the cache adapter
public
setTtl(int $ttl) : AbstractAdapter
Parameters
- $ttl : int