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

  • cGenericDb
  • cGenericDbDriver
  • cGenericDbDriverMysql
  • cItemBaseAbstract
  • cItemCache
  • Item
  • ItemCollection
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class cItemCache

Class cItemCache.

Implements features to cache entries, usually result sets of Item classes. Contains a list of self instances, where each instance contains cached Items fore one specific table.

Package: Core\GenericDB
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/genericdb/class.item.cache.php
Methods summary
protected
# __construct( string $sTable, array $aOptions = array() )

Constructor to create an instance of this class.

Constructor to create an instance of this class.

Parameters

$sTable
string
$sTable Table name
$aOptions
array
$aOptions [optional] Options array as follows: - $aOptions['max_items_to_cache'] = (int) Number of items to cache - $aOptions['enable'] = (bool) Flag to enable caching
protected
# __clone( )

Prevent cloning

Prevent cloning

public static cItemCache
# getInstance( string $sTable, array $aOptions = array() )

Returns item cache instance, creates it, if not done before. Works as a singleton for one specific table.

Returns item cache instance, creates it, if not done before. Works as a singleton for one specific table.

Parameters

$sTable
string
$sTable Table name
$aOptions
array
$aOptions [optional] Options array as follows: - $aOptions['max_items_to_cache'] = (int) Number of items to cache - $aOptions['enable'] = (bool) Flag to enable caching

Returns

cItemCache
public array
# getItemsCache( )

Returns items cache list.

Returns items cache list.

Returns

array
public array|null
# getItem( mixed $mId )

Returns existing entry from cache by it's id.

Returns existing entry from cache by it's id.

Parameters

$mId
mixed
$mId

Returns

array|null
public array|null
# getItemByProperty( mixed $mProperty, mixed $mValue )

Returns existing entry from cache by matching propery value.

Returns existing entry from cache by matching propery value.

Parameters

$mProperty
mixed
$mProperty
$mValue
mixed
$mValue

Returns

array|null
public array|null
# getItemByProperties( array $aProperties )

Returns existing entry from cache by matching properties and their values.

Returns existing entry from cache by matching properties and their values.

Parameters

$aProperties
array
$aProperties Assoziative key value pairs

Returns

array|null
public |null
# addItem( mixed $mId, array $aData )

Adds passed item data to internal cache

Adds passed item data to internal cache

Parameters

$mId
mixed
$mId
$aData
array
$aData Usually the recordset

Returns

|null

Todo

check if null should be returned
public |null
# removeItem( mixed $mId )

Removes existing cache entry by it's key

Removes existing cache entry by it's key

Parameters

$mId
mixed
$mId

Returns

|null

Todo

check if null should be returned
public |null
# removeItems( array $aIds )

Removes multiple existing cache entries by their keys

Removes multiple existing cache entries by their keys

Parameters

$aIds
array
$aIds

Returns

|null

Todo

check if null should be returned
Properties summary
protected static array $_oInstances array()
#

List of self instances (cItemCache)

List of self instances (cItemCache)

protected array $_aItemsCache array()
#

Assoziative cache array

Assoziative cache array

protected string $_sTable ''
#

Table name for current instance

Table name for current instance

protected integer $_iMaxItemsToCache 10
#

Max number of items to cache

Max number of items to cache

protected boolean $_bEnable false
#

Enable caching

Enable caching

CMS CONTENIDO 4.10.1 API documentation generated by ApiGen 2.8.0