\Cache

Cache class

Summary

Methods
Properties
Constants
getInstance()
getValue()
isValid()
clearValue()
addValue()
clear()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
__construct()
__clone()
loadCache()
deleteCacheValue()
addCacheValue()
updateCacheValue()
clearCache()
extractValue()
$instance
$cacheValues
N/A

Properties

$instance

$instance : 

Type

$cacheValues

$cacheValues : 

Type

Methods

getInstance()

getInstance() : \instance

Return Cache object

Returns

\instance —

of Cache

getValue()

getValue(string  $name) : mixed|NULL

Return cache value

Parameters

string $name

Cache parameter name

Returns

mixed|NULL

isValid()

isValid(string  $name, string  $type = 'expired') : boolean

Check is valid cache parameter

Parameters

string $name

Cache parameter name

string $type

{expired|date} Type of checking

Returns

boolean

clearValue()

clearValue(string  $name) 

Delete cache value

Parameters

string $name

Cache parameter name

addValue()

addValue(string  $name, mixed  $value, \timestamp  $valid_for) 

Add value to cache

Parameters

string $name

Cache parameter name

mixed $value

Cache value

\timestamp $valid_for

clear()

clear() 

Clear cache

__construct()

__construct() 

COnstructor

__clone()

__clone() 

Clone object

loadCache()

loadCache() 

Load cache values from DB

deleteCacheValue()

deleteCacheValue(string  $name) 

Delete cache value from DB

Parameters

string $name

Cache parameter name

addCacheValue()

addCacheValue(string  $name, mixed  $value, \timestamp  $valid_for) 

Add new cache value to DB

Parameters

string $name

Cache parameter name

mixed $value

Cache value

\timestamp $valid_for

updateCacheValue()

updateCacheValue(string  $name, mixed  $value, \timestamp  $valid_for) 

Update cache value in DB

Parameters

string $name

Cache parameter name

mixed $value

Cache value

\timestamp $valid_for

clearCache()

clearCache() 

Clear cache table

extractValue()

extractValue(string  $name) : mixed

Extract cache value from DB

Parameters

string $name

Cache parameter name

Returns

mixed