\Fuman_RuntimeCache

Cache which will write data into a file as php code

Will be loaded as PHP into a var (Optimized performance used in combination with bytec code caches e.g. APC, eAccelerator)

Summary

Methods
Properties
Constants
exists()
delete()
cache()
cacheObject()
load()
cleanUp()
shutdown()
onApplicationReady()
onApplicationFinish()
No public properties found
SETTING_NAME
_getDir()
_getDirs()
_getRuntimeSessionContainer()
_checkValidity()
_getFileName()
_getPath()
_cache()
__construct()
$_isValidDir
$_cache
$_hasIncludeError
$_sessionContainer
$_newHashes
N/A
No private methods found
No private properties found
N/A

Constants

SETTING_NAME

SETTING_NAME

Properties

$_isValidDir

$_isValidDir : 

Type

$_cache

$_cache : 

Type

$_hasIncludeError

$_hasIncludeError : 

Type

$_sessionContainer

$_sessionContainer : 

Type

$_newHashes

$_newHashes : 

Type

Methods

exists()

exists(string  $name, boolean  $useSession = false) : boolean

Runtime cache exists

Parameters

string $name
boolean $useSession

Returns

boolean

delete()

delete(string  $name) : boolean

Runtime cache delete

Parameters

string $name

Returns

boolean

cache()

cache(string  $name, array|object  $obj, boolean  $useSession = false) 

Write cache

Parameters

string $name
array|object $obj
boolean $useSession

Throws

\Exception

cacheObject()

cacheObject(string  $name, array|object  $obj, boolean  $useSession = false) 

Write cache

Parameters

string $name
array|object $obj
boolean $useSession

Throws

\Exception

load()

load(string  $name, boolean  $useSession = false, boolean  $checkValidity = true) : object|array|null

Load cache

Parameters

string $name
boolean $useSession
boolean $checkValidity

Returns

object|array|null

cleanUp()

cleanUp() 

Checks the fuman_setting value again the cached files in the file system

shutdown()

shutdown() 

Shutdown if error

onApplicationReady()

onApplicationReady() : void

Called when application is ready

onApplicationFinish()

onApplicationFinish() : void

Called before application finished

_getDir()

_getDir(string|null  $name = null) : string

Gets runtime cache dir

Parameters

string|null $name

Returns

string

_getDirs()

_getDirs() : array

Returns

array

_getRuntimeSessionContainer()

_getRuntimeSessionContainer() : object

Throws

\Fuman_Exception

Returns

object

_checkValidity()

_checkValidity(null  $name = null) 

Checks if cache is valid

Parameters

null $name

_getFileName()

_getFileName(string  $name) : string

Gets file name

Parameters

string $name

Returns

string

_getPath()

_getPath(string  $name, boolean  $useSession = false) : string

Gets path

Parameters

string $name
boolean $useSession

Returns

string

_cache()

_cache(  $name,   $obj, boolean  $useSession = false,   $serialize) 

internal write cache

Parameters

$name
$obj
boolean $useSession
$serialize

__construct()

__construct() 

Constuctor (protected)