Class Cache

Description

Wraps the major functionality of the Memcache class provided by the pecl_memcache extension. An instance of this class should be retrieved using CacheFactory, which maintains a static reference throughout the request.

Located in /Cache.php (line 47)


	
			
Method Summary
Cache __construct ()
void __destruct ()
void delete (mixed $key, [int $expiration = 0])
void flush ()
mixed &get (mixed $key)
boolean isConnected ()
void set (mixed $key,  &$value, [boolean $useCompression = false], [int $expiration = 0], mixed $value)
Methods
Constructor __construct (line 62)

Class constructor

  • access: public
Cache __construct ()
Destructor __destruct (line 83)

Class destructor

  • access: public
void __destruct ()
delete (line 96)

Deletes the specified element from the cache.

  • access: public
void delete (mixed $key, [int $expiration = 0])
  • mixed $key
  • int $expiration: = 0
flush (line 105)

Flushes the entire cache.

  • access: public
void flush ()
get (line 118)

Retrieves the specified element from the cache, or null if the element does not exist.

  • access: public
mixed &get (mixed $key)
  • mixed $key
isConnected (line 131)

Returns true if the cache is connected, false otherwise.

  • access: public
boolean isConnected ()
set (line 143)

Inserts/updates the specified element in the cache.

  • access: public
void set (mixed $key,  &$value, [boolean $useCompression = false], [int $expiration = 0], mixed $value)
  • mixed $key
  • mixed $value
  • boolean $useCompression: = false
  • int $expiration: = 0
  • &$value

Documentation generated on Thu, 14 Feb 2008 09:14:26 -0500 by phpDocumentor 1.4.1