gigabyte / cache
PHP Cache Library
Installs: 10
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/gigabyte/cache
Requires
- php: >=5.4
This package is auto-updated.
Last update: 2025-09-27 11:05:51 UTC
README
You can install Extreme PHP Cache either via package download from github or via composer install. I encourage you to do the latter:
{ "require": { "gigabyte/cache": "dev-master" } }
This PHP library makes it easy to cache any php object to the cache with the specific parameters. Currently it only support file system cache.
Basic usage
namespace gigabyte\cache; $cache_config = new CacheConfig(); $cache_config->setCacheModule('search result') ->setIntervalInDay(2) ->setCacheFilter(array('serach' => $serach, 'param1' => $value1, 'param2' => $value2)); $cache = CacheFactory::createFileCache($cache_config,"mycache/"); if ($cache->checkCache()) { $search_result = $cache->readCache(); } else { //calculate $search_result $cache->writeCache($search_result); }