vesica / cacher
A simplified caching library built on top of php-cache
Installs: 6 268
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- cache/cache: ^1.0
Requires (Dev)
- phpunit/phpunit: ^7.5
README
As the underlying PHP Cache library is now deprecated in favour of Symfony Cache (https://symfony.com/doc/current/components/cache.html), this library is no longer supported. Symfony cache simplifies a lot of the complexity much like this library did, and there's no good reason to maintain another one.
Caching Made Easy
This is wrapper around the PHP cache/cache library (https://github.com/php-cache/cache) to simplify caching with just 2 lines.
This was originally written inside https://github.com/islamic-network/waf but is now used in various projects.
Install it
composer require vesica/cacher
Use it with Redis or Memcached
$cache = new \Vesica\Cacher\Redis($host, $port, $namespace);
// OR
$cache = new \Vesica\Cacher\Memcached($host, $port, $namespace);
$cache->set($key, $value);
$cache->get($key);
$cache->exists($key);