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
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • mpAutoloaderClassMap
  • None
  • PHP
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SIWECOS
    • 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 cFileCache

This class contains functions for the CONTENIDO file cache.

Package: Core\Cache
Copyright: four for business AG <www.4fb.de>
License: http://www.contenido.org/license/LIZENZ.txt
Author: Dominik Ziegler
Located at classes/cache/class.file.cache.php
Methods summary
public
# __construct( array $options = array() )

Constructor to create an instance of this class.

Constructor to create an instance of this class.

Parameters

$options
array
$options [optional] array with options for the cache (optional, default: empty array)
public
# setOptions( array $options )

Setter for the cache options.

Setter for the cache options.

Validates incoming options and sets the default of the missing options.

Parameters

$options
array
$options array with option
public string
# generateFileName( string $id, string $group = '' )

Generates the filename based on set options.

Generates the filename based on set options.

Parameters

$id
string
$id cache ID
$group
string
$group [optional] cache group

Returns

string
filename
protected
# _validateDirectory( )

Validates the caching directory and throws exception on error.

Validates the caching directory and throws exception on error.

Throws

cInvalidArgumentException
public string
# getDestination( string $id, string $group = '' )

Returns full destination to the cached file.

Returns full destination to the cached file.

Parameters

$id
string
$id cache ID
$group
string
$group [optional] cache group

Returns

string
full filename

Throws

cInvalidArgumentException
public boolean|string
# get( string $id, string $group = '' )

Return content of a specific cache stored in filesystem.

Return content of a specific cache stored in filesystem.

If not cached, false is returned.

Parameters

$id
string
$id cache ID
$group
string
$group [optional] cache group

Returns

boolean|string
content or false

Throws

cInvalidArgumentException
public boolean
# save( string $data, string $id, string $group = '' )

Saves the content of a cache in filesystem.

Saves the content of a cache in filesystem.

Parameters

$data
string
$data data to save
$id
string
$id cache ID
$group
string
$group [optional] cache group

Returns

boolean
success state

Throws

cInvalidArgumentException
public boolean
# remove( string $id, string $group = '' )

Removes cache from filesystem.

Removes cache from filesystem.

Parameters

$id
string
$id cache ID
$group
string
$group [optional] cache group

Returns

boolean
success state

Throws

cInvalidArgumentException
public string
# generateID( mixed $variables )

Generates a ID for the given variables.

Generates a ID for the given variables.

Parameters

$variables
mixed
$variables variables to generate a ID for

Returns

string
generated ID
Properties summary
protected array $_options array()
#

Options for the cache.

Options for the cache.

CMS CONTENIDO 4.10.1 API documentation generated by ApiGen 2.8.0