University of Southern California

Public Member Functions

SOC_Cache2 Class Reference

Inheritance diagram for SOC_Cache2:
WSCORE2

List of all members.

Public Member Functions

 __construct ($conf=NULL)
 createTables ()
 setCache ($uri, $src=false, $verbose=false)
 getCache ($uri, $verbose=false)
 listCache ($verbose=false)

Detailed Description

SOC_Cache2 - simple one level cache without expiration support which stores cached content in a database table

Definition at line 138 of file soc1c.php.


Constructor & Destructor Documentation

SOC_Cache2::__construct ( conf = NULL )

__construct: Constructor for SOC_Cache2 object.

Reimplemented from WSCORE2.

Definition at line 142 of file soc1c.php.


Member Function Documentation

SOC_Cache2::createTables (  )

createTables - Execute SQL statements to (re)create necessary tables.

Returns:
true if successful in (re)creating tables, false otherwise.

Definition at line 150 of file soc1c.php.

References WSCORE2::errorCount(), WSCORE2::execute(), and WSCORE2::message().

SOC_Cache2::getCache ( uri,
verbose = false 
)

getCache - retrieve the contents of the cache if not expired and exist.

Parameters:
$uri- the key to the item in the cache
$verbose- if true send more messages to message queue.
Returns:
the cached item or false if not available.

Definition at line 208 of file soc1c.php.

References WSCORE2::getRow(), WSCORE2::mapExecute(), and WSCORE2::release().

SOC_Cache2::listCache ( verbose = false )

listCache - list the available items that have been cached.

Parameters:
$verbose- send additional messages to the message queue.
Returns:
an array of cached items or false.

Definition at line 224 of file soc1c.php.

References WSCORE2::execute(), WSCORE2::getRow(), and WSCORE2::release().

SOC_Cache2::setCache ( uri,
src = false,
verbose = false 
)

setCache - Cache an item using a URI as key.

Parameters:
$uri- the key to use to retrieve the item from the cache
$src- the content that was cached, if item is false will be cleared from the cache.
$verbose- if true then send more messages to the message queue
Returns:
true if successfully cached, false otherwise

Definition at line 182 of file soc1c.php.

References WSCORE2::errorCount(), WSCORE2::execute(), and WSCORE2::message().


The documentation for this class was generated from the following file: