Class SqliteCache

Description

A SQLite database cache.

Located in /src/cache/SqliteCache.php (line 9)

Cache
   |
   --SqliteCache
Method Summary
SqliteCache __construct (string $database)
void __destruct ()
void clear ()
boolean contains (string $hash)
boolean isExpired (string $hash)
string load (string $hash)
void remove (string $hash)
void store (string $hash, string $data, string $expiration)
Methods
Constructor __construct (line 22)

Constructor that sets up the SqliteCache.

  • access: public
SqliteCache __construct (string $database)
  • string $database: The database file to use.

Redefinition of:
Cache::__construct()
Protected constructor that sets a DefaultCachePolicy.
Destructor __destruct (line 36)

Destructor that closes the SQLite database.

  • access: public
void __destruct ()
clear (line 100)

Removes all data from the cache.

  • access: public
void clear ()

Redefinition of:
Cache::clear()
Removes all data from the cache.
contains (line 46)

Checks if data associated with a hash exists in the cache.

  • return: true if the entry exists, otherwise false.
  • access: public
boolean contains (string $hash)
  • string $hash: The hash of the entry to be checked.

Redefinition of:
Cache::contains()
Checks if data associated with a hash exists in the cache.
isExpired (line 110)

Checks if data associated with a hash is expired.

  • return: true if the entry is expired, otherwise false.
  • access: public
boolean isExpired (string $hash)
  • string $hash: The hash of the entry to be checked.

Redefinition of:
Cache::isExpired()
Checks if data associated with a hash is expired.
load (line 60)

Loads data from the cache.

  • return: The cached data.
  • access: public
string load (string $hash)
  • string $hash: The hash of the entry to be loaded.

Redefinition of:
Cache::load()
Loads data from the cache.
remove (line 73)

Removes data from the cache.

  • access: public
void remove (string $hash)
  • string $hash: The hash of the entry to be removed.

Redefinition of:
Cache::remove()
Removes data from the cache.
store (line 86)

Stores data in the cache.

  • access: public
void store (string $hash, string $data, string $expiration)
  • string $hash: The hash of the data to be stored.
  • string $data: The data to be stored.
  • string $expiration: The expiration time of the data (unix timestamp).

Redefinition of:
Cache::store()
Stores data in the cache.

Inherited Methods

Inherited From Cache

Cache::__construct()
Cache::clear()
Cache::contains()
Cache::createHash()
Cache::getPolicy()
Cache::isExpired()
Cache::load()
Cache::remove()
Cache::setPolicy()
Cache::store()

Documentation generated on Mon, 22 Dec 2008 16:57:44 +0100 by phpDocumentor 1.4.1