orbisnull / localcache
This package is abandoned and no longer maintained.
No replacement package was suggested.
php cache in apc, xcache files, etc
dev-master
2023-01-07 16:18 UTC
Requires
- php: >=5.4.0
This package is not auto-updated.
Last update: 2023-01-16 03:53:12 UTC
README
Warning Repository is outdated and abandoned! 🚫 No active development or any support! ☠️
LocalCache
Parts of this code are based on and/or adapted from original work by [Adam King] (https://github.com/agking/php-cache-class)
A simple PHP composer module, using the singleton design pattern to handle caching data.
Currently supports APC, but may be adapt to 'eaccelerator', 'xcache', 'file', etc.
$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;