Cache Class Reference

Inheritance diagram for Cache:

Model Object Object

List of all members.


Public Member Functions

 append ($string)
 clear ()
 has ()
 id ($id=null)
 remember ($content, $keep_for=CACHE_PAGES_FOR)
 restore ()

Public Attributes

 $data = null
 $for_caching = null
 $id = null
 $useTable = 'cache'

Detailed Description

Definition at line 42 of file cache.php.


Member Function Documentation

Cache::append ( string  ) 

Appends $string to the for_caching property of the Cache object.

Parameters:
string $string

Definition at line 125 of file cache.php.

Cache::clear (  ) 

Clears the cache database table.

Returns:
unknown

Definition at line 133 of file cache.php.

References Model::query().

Cache::has (  ) 

Returns true if the cache data property has current (non-stale) content for given id.

Returns:
boolean

Definition at line 117 of file cache.php.

References Model::find().

Cache::id ( id = null  ) 

Returns this object's id after setting it. If called without parameters the current object's id is returned.

Parameters:
unknown_type $id
Returns:
unknown

Definition at line 82 of file cache.php.

References $id.

Cache::remember ( content,
keep_for = CACHE_PAGES_FOR 
)

Store given content in cache database.

Parameters:
string $content Content to keep in cache.
int $keep_for Number of seconds to keep data in cache.
Returns:
boolean Success

Definition at line 95 of file cache.php.

References $data, and Model::query().

Cache::restore (  ) 

Returns content from the Cache object itself, if the Cache object has a non-empty data property. Else from the database cache.

Returns:
unknown

Definition at line 106 of file cache.php.

References Model::find().


Member Data Documentation

Cache::$data = null

Reimplemented from Model.

Definition at line 54 of file cache.php.

Referenced by remember().

Cache::$for_caching = null

Definition at line 60 of file cache.php.

Cache::$id = null

Reimplemented from Model.

Definition at line 48 of file cache.php.

Referenced by id().

Cache::$useTable = 'cache'

Reimplemented from Model.

Definition at line 66 of file cache.php.


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