## Class IDS_Caching_Database

Description

Implements interfaces:

- IDS_Caching_Interface

Database caching wrapper

This class inhabits functionality to get and set cache via a database.

- author: Lars Strojny <lars@strojny.net>
- author: Christian Matthies <ch0012@gmail.com>
- author: Mario Heiderich <mario.heiderich@gmail.com>
- version: Release: $Id:Database.php 517 2007-09-15 15:04:13Z mario $
- copyright: 2007 The PHPIDS Groupup
- link: http://php-ids.org/
- since: Version 0.4
- license: LGPL

Located in /Caching/Database.php (line 72)

Method Summary
static object getInstance (string $type, array $init)
void __construct (string $type, array $init)
mixed getCache ()
object setCache ( $data)
Methods
static method getInstance (line 129)

Returns an instance of this class

- access: public

static object getInstance (string $type, array $init)

- string $type: caching type
- array $init: the IDS_Init object

Constructor __construct (line 113)

Constructor

Connects to database.

- access: public

void __construct (string $type, array $init)

- string $type: caching type
- array $init: the IDS_Init object

getCache (line 181)

Returns the cached data

Note that this method returns false if either type or file cache is not set

- return: cache data or false
- throws: PDOException if a db error occurred
- access: public

mixed getCache ()

Implementation of:

IDS_Caching_Interface::getCache()
  Interface method

setCache (line 146)

Writes cache data into the database

- throws: PDOException if a db error occurred
- access: public

object setCache ( $data)

- array $data: the caching data

Implementation of:

IDS_Caching_Interface::setCache()
  Interface method

Documentation generated on Mon, 22 Dec 2008 13:36:42 +0100 by phpDocumentor 1.4.2