Class DiskCache

Description

A disk cache.

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

Cache
   |
   --DiskCache
Method Summary
DiskCache __construct ([string $directory = null])
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 DiskCache.

  • access: public
DiskCache __construct ([string $directory = null])
  • string $directory: The directory to use. (Optional)

Redefinition of:
Cache::__construct()
Protected constructor that sets a DefaultCachePolicy.
clear (line 87)

Removes all data from the cache.

  • access: public
void clear ()

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

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 98)

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 57)

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 66)

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 78)

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:35 +0100 by phpDocumentor 1.4.1