phpDocumentor Cotonti
[ class tree: Cotonti ] [ index: Cotonti ] [ all elements ]

Class: MySQL_cache

Source Location: /cache.php

Class MySQL_cache

Class Overview

A very popular caching solution using MySQL as a storage. It is quite slow compared to File_cache but may be considered more reliable.

Located in /cache.php [line 545]

Dynamic_cache_driver
   |
   --Writeback_cache_driver
      |
      --Db_cache_driver
         |
         --MySQL_cache
Author(s):
  • trustmaster
Information Tags:

Methods

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From Writeback_cache_driver

Writeback_cache_driver::$removed_data
Writeback_cache_driver::$writeback_data

Inherited From Db_cache_driver

Db_cache_driver::get_all()
Loads all variables from a specified realm(s) into the global scope

Inherited From Writeback_cache_driver

Writeback_cache_driver::remove()
Removes cache image of the object from the database
Writeback_cache_driver::remove_now()
Removes item immediately, avoiding writeback.
Writeback_cache_driver::store()
Stores data as object image in cache
Writeback_cache_driver::store_now()
Writes item to cache immediately, avoiding writeback.
Writeback_cache_driver::__destruct()
Writes modified entries back to persistent storage

Inherited From Dynamic_cache_driver

Dynamic_cache_driver::store()
Stores data as object image in cache

[ Top ]
Method Summary
MySQL_cache   __construct()   Performs pre-load actions
void   __destruct()   Saves all modified data with one query
void   clear()  
void   exists()  
void   get()  
void   get_all()  
void   remove_now()  
bool   store_now()   Writes item to cache immediately, avoiding writeback.

[ Top ]
Methods
Constructor __construct  [line 556]

  MySQL_cache __construct( )

Performs pre-load actions


API Tags:
Access:  public


[ Top ]
Destructor __destruct  [line 565]

  void __destruct( )

Saves all modified data with one query


API Tags:
Access:  public


Redefinition of:
Writeback_cache_driver::__destruct()
Writes modified entries back to persistent storage

[ Top ]
clear  [line 604]

  void clear( [ $realm = '']  )

Parameters:
   $realm: 

API Tags:
See:  Cache_driver::clear()
Access:  public


[ Top ]
exists  [line 622]

  void exists( $id, [ $realm = COT_DEFAULT_REALM]  )

Parameters:
   $id: 
   $realm: 

API Tags:
See:  Cache_driver::exists()
Access:  public


[ Top ]
get  [line 648]

  void get( $id, [ $realm = COT_DEFAULT_REALM]  )

Parameters:
   $id: 
   $realm: 

API Tags:
See:  Cache_driver::get()
Access:  public


[ Top ]
get_all  [line 664]

  void get_all( [ $realms = COT_DEFAULT_REALM]  )

Parameters:
   $realms: 

API Tags:
See:  Db_cache_driver::get_all()
Access:  public


Redefinition of:
Db_cache_driver::get_all()
Loads all variables from a specified realm(s) into the global scope

[ Top ]
remove_now  [line 697]

  void remove_now( $id, [ $realm = COT_DEFAULT_REALM]  )

Parameters:
   $id: 
   $realm: 

API Tags:
See:  Writeback_cache_driver::remove_now()
Access:  public


Redefinition of:
Writeback_cache_driver::remove_now()
Removes item immediately, avoiding writeback.

[ Top ]
store_now  [line 714]

  bool store_now( string $id, mixed $data, [string $realm = COT_DEFAULT_REALM], [int $ttl = COT_DEFAULT_TTL]  )

Writes item to cache immediately, avoiding writeback.

Parameters:
string   $id:  Object identifier
mixed   $data:  Object value
string   $realm:  Realm name
int   $ttl:  Time to live, 0 for unlimited

API Tags:
See:  Cache_driver::store()
Access:  public


Redefinition of:
Writeback_cache_driver::store_now()
Writes item to cache immediately, avoiding writeback.

[ Top ]

Documentation generated on Fri, 19 Mar 2010 17:45:22 +0000 by phpDocumentor 1.4.3