Class Cache_Engine_Memcache

Description

Implements interfaces:

The memcache cache engine. This engine requires the Memcache extension to be installed. Items stored with the memcache engine use memcached for storage.

The memcache cache accepts two cache-specific options:

  • memcache_host: The host where memcached is accepting connections (or unix:///path/to/socket)
  • memcache_port: The port where memcache is listening

Located in /cache/lib/Cache/Engine/Memcache.php (line 15)


	
			
Variable Summary
 mixed $logger
 mixed $memcaches
Method Summary
 static boolean is_supported ()
 void clear ([array $options = null])
 array get_connection_options ([array $options = null])
 void get_memcache ([array $options = null])
 void get_server_description ([array $options = null])
 boolean has_locking ()
 Cache_ItemBase item_for_key (string $key, array $options)
 void logger ()
 void __constructor ()
Variables
mixed $logger (line 18)
  • access: protected
mixed $memcaches (line 17)
  • access: protected
Methods
static is_supported (line 67)

Called statically to ensure this engine is supported before constructing it. The memcache engine is only supported when the memcache extension is also present.

  • access: public
boolean is_supported ()

Implementation of:
Cache_Engine::is_supported()
Called statically to ensure this engine is supported before constructing it. Most engines will want to always return true, but in some cases it may be a good place to check that all needed extensions are present.
clear (line 53)

Clear all items from the cache

  • access: public
void clear ([array $options = null])
  • array $options: Any cache options provided by the requestor

Implementation of:
Cache_Engine::clear()
Clear all items from the cache
get_connection_options (line 115)

Return host and port connection values for a given set of options

  • return: In the form array($host, $port)
  • access: public
array get_connection_options ([array $options = null])
  • array $options: The options to use
get_memcache (line 79)

Returns the Memcache instance for a given set of options

  • access: public
void get_memcache ([array $options = null])
  • array $options: The options to use
get_server_description (line 104)

Returns the server description for a given set of options

  • access: public
void get_server_description ([array $options = null])
  • array $options: The options to use
has_locking (line 44)

Returns false to indicate this engine's item do not provide locking

  • access: public
boolean has_locking ()

Implementation of:
Cache_Engine::has_locking()
Return true if this Engine's items provide locking
item_for_key (line 35)

Return the cache item object for the provided key.

  • access: public
Cache_ItemBase item_for_key (string $key, array $options)
  • string $key: The key to retrieve the item for
  • array $options: Any cache options provided by the requestor

Implementation of:
Cache_Engine::item_for_key()
Return the cache item object for the provided key.
logger (line 134)

Return a logger instance for the class

  • access: public
void logger ()
__constructor (line 23)

Constructor

  • access: public
void __constructor ()

Documentation generated on Wed, 25 Apr 2012 09:46:43 -0700 by phpDocumentor 1.4.3