Class XOAD_Cache_Storage_MySQL

Description

XOAD_Cache Storage MySQL Class.

This class is a XOAD_Cache_Storage successor.

  • version: 0.6.0.0
  • author: Stanimir Angeloff

Located in /extensions/cache/classes/storage/MySQL.class.php (line 42)

XOAD_Cache_Storage
   |
   --XOAD_Cache_Storage_MySQL
Variable Summary
 string $database
 bool $openNew
 string $password
 string $port
 string $server
 string $user
Method Summary
 XOAD_Cache_Storage_MySQL XOAD_Cache_Storage_MySQL (string $dsn)
 void closeConnection (mixed &$connection)
 bool collectGarbage ()
 string escapeString (mixed $unescapedString, mixed $connection)
 resource &getConnection ()
 mixed load (string $id)
 bool save (mixed $id, int $expires, mixed $data)
Variables
string $database (line 82)

Holds the MySQL database used in the connection string.

  • access: protected
bool $openNew (line 103)

Indicates whether to open a new connection to the MySQL server if an old one already exists.

  • access: protected
string $password (line 72)

Holds the MySQL password used in the connection string.

  • access: protected
string $port = 3306 (line 92)

Holds the MySQL port used in the connection string.

  • access: protected
string $server (line 52)

Holds the MySQL server used in the connection string.

  • access: protected
string $user (line 62)

Holds the MySQL user used in the connection string.

  • access: protected
Methods
Constructor XOAD_Cache_Storage_MySQL (line 114)

Creates a new instance of the XOAD_Cache_Storage_MySQL class.

  • access: public
XOAD_Cache_Storage_MySQL XOAD_Cache_Storage_MySQL (string $dsn)
  • string $dsn: The data source name and parameters to use when creating the instance.
closeConnection (line 151)

Closes a MySQL connection link.

  • access: private
void closeConnection (mixed &$connection)
collectGarbage (line 188)

Deletes old data from the cache.

This method is called before calling load to delete all expired data from the cache.

  • return: true on success, false otherwise.
  • access: public
bool collectGarbage ()

Redefinition of:
XOAD_Cache_Storage::collectGarbage()
Abstract base class method.
escapeString (line 167)

Escapes special characters in the $unescapedString, taking into account the current charset of the connection.

  • access: private
string escapeString (mixed $unescapedString, mixed $connection)
getConnection (line 127)

Creates a MySQL connection link.

  • access: private
resource &getConnection ()
load (line 211)

Loads data from the cache with a given ID.

  • return: The data in the cache with the given ID or null.
  • access: public
mixed load (string $id)
  • string $id: The ID of the cached data.

Redefinition of:
XOAD_Cache_Storage::load()
Abstract base class method.
save (line 248)

Saves data in the cache with a given ID and lifetime.

  • return: True on success, false otherwise.
  • access: public
bool save (mixed $id, int $expires, mixed $data)
  • mixed $id: The ID to use when saving the data.
  • int $expires: The lifetime time in seconds for the cached data.
  • mixed $data: The data to cache.

Redefinition of:
XOAD_Cache_Storage::save()
Abstract base class method.

Inherited Methods

Inherited From XOAD_Cache_Storage

 XOAD_Cache_Storage::XOAD_Cache_Storage()
 XOAD_Cache_Storage::collectGarbage()
 XOAD_Cache_Storage::generateID()
 XOAD_Cache_Storage::load()
 XOAD_Cache_Storage::save()

Documentation generated on Sat, 12 Nov 2005 20:24:22 +0200 by phpDocumentor 1.3.0RC3