ClassInterface Cache_Engine

Description

Cache_Engine defines the interface that cache implementations must conform to.

The interface is very simple, only one method is involved. The work is in implementing the object it returns, which must be an instance of Cache_ItemBase or provide the same methods as that class.

Note that what the above is saying is that the engine class does not return cached values directly. It returns an object which can be used to test for, read, or write the value associated with the requested key. So, even if a value does not exist in the cache, the engine must return an object which can be used to create it.

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


	
			
Method Summary
 static boolean is_supported ()
 void clear ([array $options = null])
 boolean has_locking ()
 Cache_ItemBase item_for_key (string $key, array $options)
Methods
static is_supported (line 46)

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.

  • access: public
boolean is_supported ()
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
has_locking (line 36)

Return true if this Engine's items provide locking

  • access: public
boolean has_locking ()
item_for_key (line 29)

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

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