public __construct ($dir = 'cache/datastore')
Constructor method creates the directory if it's missing.
public static init ($conf)
Initialize the correct cache based on the global configuration and return the cache object (lib/MemcacheExt, lib/MemcacheAPC, lib/MemcacheXCache, lib/MemcacheRedis, or lib/Cache).
private _set_timeout ($key, $timeout)
Create a timeout file to store the timeout of the cached data. Uses a similarly named dot-file to the main file that contains only the timeout value.
This is a basic class that immitates Memcache via the filesystem so handlers can use "poor man's caching" even if Memcache ins't available.
Also provides an
init()
method that initializes the correct cache for the current request (Memcache, Redis, or itself).