Methods
Returns microtime (Unix-Timestamp), used to calculate time of execution.
_getMicroTime() : float
Inherited
access |
private |
inherited_from |
\cConCache::_getMicroTime() |
Returns
float
Timestamp
_initPEARCache()
_initPEARCache()
Inherited
inherited_from |
\cConCache::_initPEARCache() |
Checks, if the create code flag is set.
_isCode2Create(mixed $iCreateCode) : bool
Output will be loaded from cache, if no code is 2 create.
It also checks the state of global variable $force.
Parameters
$iCreateCode
mixed
State of create code (0 or 1). The state will be loaded from database if value is "null"
Returns
bool
True if code is to create, otherwhise false.
Raises any defined event code by using eval().
_raiseEvent(string $name) : void
Inherited
access |
private |
inherited_from |
\cConCache::_raiseEvent() |
Parameters
$name
string
Name of event 2 raise
Add option 4 caching (e.
addOption(string $name, string $option) : void
Inherited
g. $_GET,$_POST, $_COOKIE, ...). Used 2 generate the id for caching.
inherited_from |
\cConCache::addOption() |
Parameters
$name
string
Name of option
$option
string
Value of option (any variable)
Constructor of cConCache
cConCache(string $cachedir, string $cachegroup, string $cacheprefix)
Inherited
inherited_from |
\cConCache::cConCache() |
Parameters
$cachedir
string
Directory 2 cache files
$cachegroup
string
Subdirectory 2 cache files
$cacheprefix
string
Prefixname 2 add 2 cached files
Constructor of cConCacheHandler.
cConCacheHandler(array $aConf, \obj $db, int $iCreateCode)
Does some checks and sets the configuration of cache object.
Parameters
$aConf
array
Configuration of caching as follows:
- $a['excludecontenido'] bool. don't cache output, if we have a contenido variable,
e. g. on calling frontend preview from backend
- $a['enable'] bool. activate caching of frontend output
- $a['debug'] bool. compose debuginfo (hit/miss and execution time of caching)
- $a['infotemplate'] string. debug information template
- $a['htmlcomment'] bool. add a html comment including several debug messages to output
- $a['lifetime'] int. lifetime in seconds 2 cache output
- $a['cachedir'] string. directory where cached content is 2 store.
- $a['cachegroup'] string. cache group, will be a subdirectory inside cachedir
- $a['cacheprefix'] string. add prefix 2 stored filenames
- $a['idoptions'] array. several variables 2 create a unique id, if the output depends
on them. e. g. array('uri'=>$_SERVER['REQUEST_URI'],'post'=>$_POST,'get'=>$_GET);
$db
\obj
Reference 2 Contenido database object
$iCreateCode
int
Flag of createcode state from table con_cat_art
Set/Get the flag 2 debug cache object (prints out miss/hit state with execution time).
debug(bool $debug) : mixed
Inherited
inherited_from |
\cConCache::debug() |
Parameters
$debug
bool
True 2 activate debugging or false.
Returns
mixed
Debug flag or void
Set/Get the flag 2 enable caching.
enable(bool $enable) : mixed
Inherited
inherited_from |
\cConCache::enable() |
Parameters
$enable
bool
True 2 enable chaching or false
Returns
mixed
Enable flag or void
Handles ending of PEAR caching.
end() : void
Inherited
inherited_from |
\cConCache::end() |
Returns information cache hit/miss and execution time if caching is enabled.
getInfo() : string
Inherited
inherited_from |
\cConCache::getInfo() |
Returns
string
Information about cache if caching is enabled, otherwhise nothing.
Set/Get template to use on printing the chache info.
infoTemplate(string $template) : void
Inherited
inherited_from |
\cConCache::infoTemplate() |
Parameters
$template
string
Template string including the '%s' format definition.
Set/Get caching lifetime in seconds.
lifetime(int $seconds) : mixed
Inherited
inherited_from |
\cConCache::lifetime() |
Parameters
$seconds
int
New Lifetime in seconds
Returns
mixed
Actual lifetime or void
Removes any cached content if exists.
removeFromCache() : void
Inherited
This is nesessary to delete cached articles, if they are changed on backend.
inherited_from |
\cConCache::removeFromCache() |
Handles PEAR caching.
start(int $iPageStartTime) : void
Inherited
The script will be terminated by calling die(), if any cached
content is found.
inherited_from |
\cConCache::start() |
Parameters
$iPageStartTime
int
Optional start time, e. g. start time of main script
Properties
$_aCacheOptions : array
Inherited
inherited_from |
\cConCache::$$_aCacheOptions |
$_aEventCode : array
Inherited
We have actually two events:
- 'beforeoutput': code to execute before doing the output
- 'afteroutput' code to execute after output
inherited_from |
\cConCache::$$_aEventCode |
$_aIDOptions : array
Inherited
g. $_GET,$_POST, $_COOKIE, ...).
inherited_from |
\cConCache::$$_aIDOptions |
$_bDebug : bool
Inherited
inherited_from |
\cConCache::$$_bDebug |
$_bEnableCaching : bool
Inherited
inherited_from |
\cConCache::$$_bEnableCaching |
$_iLifetime : int
Inherited
inherited_from |
\cConCache::$$_iLifetime |
$_iStartTime : int
Inherited
inherited_from |
\cConCache::$$_iStartTime |
$_oPearCache : \obj
Inherited
inherited_from |
\cConCache::$$_oPearCache |
$_sDebugMsg : string
Inherited
inherited_from |
\cConCache::$$_sDebugMsg |
$_sDebugTpl : string
Inherited
inherited_from |
\cConCache::$$_sDebugTpl |
$_sDir : string
Inherited
inherited_from |
\cConCache::$$_sDir |
$_sGroup : string
Inherited
inherited_from |
\cConCache::$$_sGroup |
$_sID : string
Inherited
inherited_from |
\cConCache::$$_sID |
$_sPrefix : string
Inherited
inherited_from |
\cConCache::$$_sPrefix |