Warning
Repository is outdated and abandoned! :no_entry_sign: No active development or any support! :skull_and_crossbones:, (*1)
LocalCache
Parts of this code are based on and/or adapted from original work by [Adam King] (https://github.com/agking/php-cache-class), (*2)
A simple PHP composer module, using the singleton design pattern to handle caching data., (*3)
Currently supports APC, but may be adapt to 'eaccelerator', 'xcache', 'file', etc., (*4)
$cache = LocalCache::getInstance();
if (false !== ($data = $cache->get($id))) {
$data = get_data_from_db($id);
$cache->set($id, $data);
}
return $data;
The data is automatically serialize/unserialize in LocalCache;, (*5)