Cache Interface Reference

Detailed Description

Cache defines the interface for cache implementations.

Caches are divided into different sections, which store key value pairs.

Author
ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m

Definition at line 21 of file Cache.php.

+ Inheritance diagram for Cache:

Public Member Functions

 exists ($section, $key)
 
 getDate ($section, $key)
 
 get ($section, $key)
 
 put ($section, $key, $value)
 
 clear ($section)
 
 clearAll ()
 

Member Function Documentation

exists (   $section,
  $key 
)

Check if a cache entry exists.

Parameters
$sectionThe cache section
$keyThe cache key
Returns
boolean

Implemented in FileCache, and NullCache.

getDate (   $section,
  $key 
)

Get the date of the specified cache entry.

Parameters
$sectionThe cache section
$keyThe cache key
Returns
DateTime or null, if not cached

Implemented in FileCache.

get (   $section,
  $key 
)

Get the value of the specified cache entry.

Parameters
$sectionThe cache section
$keyThe cache key
Returns
Mixed

Implemented in FileCache, and NullCache.

put (   $section,
  $key,
  $value 
)

Store the value of the specified cache entry.

Parameters
$sectionThe cache section
$keyThe key
$valueThe value

Implemented in FileCache, and NullCache.

clear (   $section)

Clear the given cache section.

The wildcard char '*' may be added to the section name in order to clear all matching sections.

Parameters
$sectionThe cache section

Implemented in FileCache, and NullCache.

clearAll ( )

Clear all cache sections.

Implemented in FileCache, and NullCache.