Class CacheHandler

Description

The CacheHandler class.

This class can be used to cache data and to retrieve cached data. Cached data is stored on file at the server and fast to work with.

The class makes it possible to handle cache data with PHP as well as with JavaScript. It can handle all kinds of serializible data.

IMPORTANT - In order to use the class, the caching folder must be set in the Wigbi configuration file. For the class to work, Wigbi must also be allowed to create files within the cache folder.

Located in /wigbi_source/php/system/CacheHandler.php (line 41)


	
			
Method Summary
 static void beginCache (string $name, [int $validityTime = 10])
 static void clear (string $name)
 static void endCache ()
 static void get ( $name, string $keyName)
 static void set (string $name, mixed $data, [int $validityTime = 10])
Methods
static beginCache (line 68)

Begin caching the output buffer.

Use this function to begin caching everything that is sent to the output buffer and use the endCache function to stop caching the output buffer.

  • access: public
static void beginCache (string $name, [int $validityTime = 10])
  • string $name: The name of the cached data.
  • int $validityTime: The time, in minutes, for how long the data is valid; default 10.
static clear (line 118)

Clear any cached data.

  • access: public
static void clear (string $name)
  • string $name: The name of the cached data to clear.
static endCache (line 87)

Stop caching the output buffer.

Use this function to stop caching everything that is sent to the output buffer.

  • access: public
static void endCache ()
static get (line 131)

Retrieve data from the cache.

  • access: public
static void get ( $name, string $keyName)
  • string $keyName: The name of the cached data.
  • $name
static set (line 168)

Save data to the cache.

  • access: public
static void set (string $name, mixed $data, [int $validityTime = 10])
  • string $name: The name of the cached data.
  • mixed $data: The data that is to be cached.
  • int $validityTime: The time, in minutes, for how long the data is valid; default 10.

Documentation generated on Sun, 27 Dec 2009 20:11:59 +0100 by phpDocumentor 1.4.1