orbisnull / localcache
php cache in apc, xcache files, etc
Installs: 4
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 6
pkg:composer/orbisnull/localcache
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;