Overview

Packages

  • CONTENIDO
  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentRssCreator
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • 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
  • Smarty
    • Cacher
    • Compiler
    • Config
    • Debug
    • PluginsBlock
    • PluginsFilter
    • PluginsFunction
    • PluginsInternal
    • PluginsModifier
    • PluginsModifierCompiler
    • PluginsShared
    • Security
    • Template
    • TemplateResources
  • Swift
    • ByteStream
    • CharacterStream
    • Encoder
    • Events
    • KeyCache
    • Mailer
    • Mime
    • Plugins
    • Transport

Classes

  • cFileCache
  • cOutputCache
  • cOutputCacheHandler
  • Overview
  • Package
  • Class
  • Todo
  • Download

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
Directory 2 cache files
$cachegroup
Subdirectory 2 cache files
$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
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
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
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
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

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
Name of option
$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

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
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

Flag 2 activate caching.

Flag 2 activate caching.

# false
protected boolean $_bDebug

Flag for output of debug informations.

Flag for output of debug informations.

# false
protected boolean $_bHtmlComment

Flag 2 print html comment including some debug informations.

Flag 2 print html comment including some debug informations.

# false
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

Directory 2 store cached output.

Directory 2 store cached output.

# 'cache/'
protected string $_sGroup

Subdirectory 2 store cached output.

Subdirectory 2 store cached output.

# 'default'
protected string $_sPrefix

Substring 2 add as prefix to cache-filename.

Substring 2 add as prefix to cache-filename.

# 'cache_output_'
protected integer $_iLifetime

Default lifetime of cached files.

Default lifetime of cached files.

# 3600
protected string $_sDebugMsg

Used 2 store debug message.

Used 2 store debug message.

# ''
protected string $_sDebugTpl

HTML code template used for debug message.

HTML code template used for debug message.

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

HTML comment template used for generating some debug infos.

HTML comment template used for generating some debug infos.

# ' <!-- CACHESTATE: %s TIME: %s VALID UNTIL: %s --> '
CMS CONTENIDO 4.9.7 API documentation generated by ApiGen