\lfcache

Quick memcache style key-value pair storage into $_SESSION, just for the duration of the single request. Better than singletons, better than passing around a single object to every app

Summary

Methods
Properties
Constants
permSet()
permGet()
tempClearKey()
sessSet()
sessGet()
sessClearKey()
sessClearAll()
readFile()
toFile()
startTimer()
endTimer()
getTimerResult()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

permSet()

permSet(  $key,   $value,   $namespace = 'default') 

Parameters

$key
$value
$namespace

permGet()

permGet(  $key,   $namespace = 'default') 

Parameters

$key
$namespace

tempClearKey()

tempClearKey(  $key,   $namespace = 'default') 

Parameters

$key
$namespace

sessSet()

sessSet(  $key,   $value,   $namespace = 'default') 

Temporarily set value into session for later user. Clears at end of PHP execution.

Parameters

$key
$value
$namespace

sessGet()

sessGet(  $key,   $namespace = 'default') 

Get temporary value into session for later user. Cleared at end of PHP execution.

Parameters

$key
$namespace

sessClearKey()

sessClearKey(  $key,   $namespace = 'default') 

Clear lf_cache $key from session

Parameters

$key
$namespace

sessClearAll()

sessClearAll() 

Clear full lf_cache from session

readFile()

readFile(  $filename) 

Return given $filename content as string

Parameters

$filename

toFile()

toFile(  $data,   $filename) 

Save $data to $filename

Parameters

$data
$filename

startTimer()

startTimer(  $key) 

Start timer for $key

Parameters

$key

endTimer()

endTimer(  $key) 

End timer for $key

Parameters

$key

getTimerResult()

getTimerResult(  $key) 

Return $key from timer_result

Parameters

$key