Interface Sugar_CacheDriver

Description

Interface for Sugar cache drivers. These are used for storing and retrieving bytecode and HTML caches.

Located in /Sugar/CacheDriver.php (line 55)


	
			
Method Summary
bool clear ()
bool erase (string $key, string $type)
int getLastModified (string $key, string $type)
array load (string $key, string $type)
bool store (string $key, string $type, array $data)
Methods
clear (line 112)

Clears all caches the driver is responsible for.

  • return: True on success.
  • abstract:
bool clear ()
erase (line 103)

Erases the bytecode for the requested reference.

  • return: True on success.
  • abstract:
bool erase (string $key, string $type)
  • string $key: File reference for the bytecode to erase.
  • string $type: Either 'ctpl' or 'chtml'.
getLastModified (line 67)

Returns the timestamp for the given reference, or zero if the file is not in the cache.

  • return: Timestamp, or 0 if the file does not exist.
  • abstract:
int getLastModified (string $key, string $type)
  • string $key: File reference to lookup.
  • string $type: Either 'ctpl' or 'chtml'.
load (line 78)

Returns the bytecode for the requested reference.

  • return: Bytecode, or false if not in the cache.
  • abstract:
array load (string $key, string $type)
  • string $key: File reference to lookup.
  • string $type: Either 'ctpl' or 'chtml'.
store (line 91)

Adds the bytecode to the cache.

  • return: True on success.
  • abstract:
bool store (string $key, string $type, array $data)
  • string $key: File reference to lookup.
  • string $type: Either 'ctpl' or 'chtml'.
  • array $data: Bytecode.

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