Class Sugar_Cache_Memcache

Description

Implements interfaces:

Memcache-based cache driver.

Uses {$link Sugar::$cacheTime} to control behavior.

Located in /Sugar/Cache/Memcache.php (line 54)


	
			
Method Summary
Sugar_Cache_Memcache __construct (Sugar $sugar,  $memcached)
bool clear ()
bool erase (Sugar_Template $template, string $type)
int getLastModified (Sugar_Template $template, string $type)
array load (Sugar_Template $template, string $type)
bool store (Sugar_Template $template, string $type, array $data)
Methods
Constructor __construct (line 75)

Constructor.

  • access: public
Sugar_Cache_Memcache __construct (Sugar $sugar,  $memcached)
  • Sugar $sugar: Sugar instance.
  • Memcached $memcached
clear (line 178)

Clears all caches the driver is responsible for.

  • return: True on success.
  • access: public
bool clear ()

Implementation of:
Sugar_CacheDriver::clear()
Clears all caches the driver is responsible for.
erase (line 167)

Erases the bytecode for the requested reference.

  • return: True on success.
  • access: public
bool erase (Sugar_Template $template, string $type)
  • Sugar_Template $template: File reference for the bytecode to erase.
  • string $type: Either 'ctpl' or 'chtml'.

Implementation of:
Sugar_CacheDriver::erase()
Erases the bytecode for the requested reference.
getLastModified (line 107)

Returns the timestamp.

  • return: Timestamp
  • access: public
int getLastModified (Sugar_Template $template, string $type)
  • Sugar_Template $template: File reference.
  • string $type: Either 'ctpl' or 'chtml'.

Implementation of:
Sugar_CacheDriver::getLastModified()
Returns the timestamp for the given reference, or zero if the file is not in the cache.
load (line 128)

Returns the bytecode for the requested reference.

  • return: Bytecode, or false if not in the cache.
  • access: public
array load (Sugar_Template $template, string $type)
  • Sugar_Template $template: File reference to lookup.
  • string $type: Either 'ctpl' or 'chtml'.

Implementation of:
Sugar_CacheDriver::load()
Returns the bytecode for the requested reference.
store (line 152)

Adds the bytecode to the cache.

  • return: True on success.
  • throws: Sugar_Exception_Usage when the cache directory is missing or otherwise unusable.
  • access: public
bool store (Sugar_Template $template, string $type, array $data)
  • Sugar_Template $template: File reference to lookup.
  • string $type: Either 'ctpl' or 'chtml'.
  • array $data: Bytecode.

Implementation of:
Sugar_CacheDriver::store()
Adds the bytecode to the cache.

Documentation generated on Sat, 18 Sep 2010 05:27:01 +0000 by phpDocumentor 1.4.3