Overview

Packages

  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Datatype
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
  • mpAutoloaderClassMap
  • None
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SearchSolr
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob

Classes

  • cFileCache
  • cOutputCache
  • cOutputCacheHandler
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class cOutputCache

This class contains functions for the output cache in CONTENIDO.

Direct known subclasses

cOutputCacheHandler
Package: Core\Cache
Copyright: four for business AG <www.4fb.de>
License: http://www.contenido.org/license/LIZENZ.txt
Author: Murat Purc <murat@purc.de>
Located at classes/cache/class.output.cache.php
Methods summary
public
# __construct( string $cachedir = NULL, string $cachegroup = NULL, string $cacheprefix = NULL )

Constructor of cOutputCache

Constructor of cOutputCache

Parameters

$cachedir
string
$cachedir Directory 2 cache files
$cachegroup
string
$cachegroup Subdirectory 2 cache files
$cacheprefix
string
$cacheprefix Prefixname 2 add 2 cached files
public mixed
# enable( boolean $enable = NULL )

Set/Get the flag 2 enable caching.

Set/Get the flag 2 enable caching.

Parameters

$enable
boolean
$enable True 2 enable caching or false

Returns

mixed
Enable flag or void
public mixed
# debug( boolean $debug )

Set/Get the flag 2 debug cache object (prints out miss/hit state with execution time).

Set/Get the flag 2 debug cache object (prints out miss/hit state with execution time).

Parameters

$debug
boolean
$debug True 2 activate debugging or false.

Returns

mixed
Debug flag or void
public |string
# htmlComment( boolean $htmlcomment )

Set/Get flag 2 print out cache info as html comment.

Set/Get flag 2 print out cache info as html comment.

Parameters

$htmlcomment
boolean
$htmlcomment True debugging or false.

Returns

|string
Htmlcomment flag or void
public mixed
# lifetime( integer $seconds = NULL )

Set/Get caching lifetime in seconds.

Set/Get caching lifetime in seconds.

Parameters

$seconds
integer
$seconds New Lifetime in seconds

Returns

mixed
Actual lifetime or void
public
# infoTemplate( string $template )

Set/Get template to use on printing the chache info.

Set/Get template to use on printing the chache info.

Parameters

$template
string
$template Template string including the '%s' format definition.
public
# addOption( string $name, string $option )

Add option 4 caching (e. g. $_GET,$_POST, $_COOKIE, ...). Used 2 generate the id for caching.

Add option 4 caching (e. g. $_GET,$_POST, $_COOKIE, ...). Used 2 generate the id for caching.

Parameters

$name
string
$name Name of option
$option
string
$option Value of option (any variable)
public string
# getInfo( )

Returns information cache hit/miss and execution time if caching is enabled.

Returns information cache hit/miss and execution time if caching is enabled.

Returns

string
Information about cache if caching is enabled, otherwhise nothing.
protected boolean
# _start( )

Starts the cache process.

Starts the cache process.

Returns

boolean
string
public
# start( integer $iPageStartTime = NULL )

Handles PEAR caching. The script will be terminated by calling die(), if any cached content is found.

Handles PEAR caching. The script will be terminated by calling die(), if any cached content is found.

Parameters

$iPageStartTime
integer
$iPageStartTime Optional start time, e. g. start time of main script
public
# end( )

Handles ending of PEAR caching.

Handles ending of PEAR caching.

public
# removeFromCache( )

Removes any cached content if exists. This is nesessary to delete cached articles, if they are changed on backend.

Removes any cached content if exists. This is nesessary to delete cached articles, if they are changed on backend.

protected
# _initFileCache( )

Creates one-time a instance of PEAR cache output object and also the unique id, if propery $this->_oPearCache is not set.

Creates one-time a instance of PEAR cache output object and also the unique id, if propery $this->_oPearCache is not set.

protected
# _raiseEvent( string $name )

Raises any defined event code by using eval().

Raises any defined event code by using eval().

Parameters

$name
string
$name Name of event 2 raise
protected float
# _getMicroTime( )

Returns microtime (Unix-Timestamp), used to calculate time of execution.

Returns microtime (Unix-Timestamp), used to calculate time of execution.

Returns

float
Timestamp
Properties summary
protected cFileCache $_fileCache
#

File Cache Object

File Cache Object

protected boolean $_bEnableCaching false
#

Flag 2 activate caching.

Flag 2 activate caching.

protected boolean $_bDebug false
#

Flag for output of debug informations.

Flag for output of debug informations.

protected boolean $_bHtmlComment false
#

Flag 2 print html comment including some debug informations.

Flag 2 print html comment including some debug informations.

protected integer $_iStartTime
#

Start time of caching.

Start time of caching.

protected array $_aIDOptions
#

Option array 4 generating cache identifier (e. g. $_GET,$_POST, $_COOKIE, ...).

Option array 4 generating cache identifier (e. g. $_GET,$_POST, $_COOKIE, ...).

protected array $_aCacheOptions
#

Option array 4 pear caching.

Option array 4 pear caching.

protected array $_aEventCode
#

Handler array 2 store code, beeing executed on some hooks. We have actually two hooks:

  • 'beforeoutput': code to execute before doing the output
  • 'afteroutput' code to execute after output

Handler array 2 store code, beeing executed on some hooks. We have actually two hooks:

  • 'beforeoutput': code to execute before doing the output
  • 'afteroutput' code to execute after output
protected string $_sID
#

Unique identifier for caching.

Unique identifier for caching.

protected string $_sDir 'cache/'
#

Directory 2 store cached output.

Directory 2 store cached output.

protected string $_sGroup 'default'
#

Subdirectory 2 store cached output.

Subdirectory 2 store cached output.

protected string $_sPrefix 'cache_output_'
#

Substring 2 add as prefix to cache-filename.

Substring 2 add as prefix to cache-filename.

protected integer $_iLifetime 3600
#

Default lifetime of cached files.

Default lifetime of cached files.

protected string $_sDebugMsg ''
#

Used 2 store debug message.

Used 2 store debug message.

protected string $_sDebugTpl '<div>%s</div>'
#

HTML code template used for debug message.

HTML code template used for debug message.

protected string $_sHtmlCommentTpl ' <!-- CACHESTATE: %s TIME: %s VALID UNTIL: %s --> '
#

HTML comment template used for generating some debug infos.

HTML comment template used for generating some debug infos.

CMS CONTENIDO 4.9.5 API documentation generated by ApiGen 2.8.0