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)
 
 get ($section, $key)
 
 put ($section, $key, $value)
 
 clear ($section)
 
 clearAll ()
 

Member Function Documentation

exists (   $section,
  $key 
)

Check if a key exists in the specified cache.

Parameters
$sectionThe caching section
$keyThe cache key
Returns
boolean

Implemented in FileCache, and NullCache.

get (   $section,
  $key 
)

Get a value from the specified cache.

Parameters
$sectionThe caching section
$keyThe cache key
Returns
Mixed

Implemented in FileCache, and NullCache.

put (   $section,
  $key,
  $value 
)

Store a value in the specified cache.

Parameters
$sectionThe caching 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 caching section

Implemented in FileCache, and NullCache.

clearAll ( )

Clear all cache sections.

Implemented in FileCache, and NullCache.