Skip to content
This repository has been archived by the owner on Jun 15, 2022. It is now read-only.
/ cacher Public archive

A simplified wrapper around cacher/cacher with Memcached and Redis support

License

Notifications You must be signed in to change notification settings

vesica/cacher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deprecation Notice - June 2022

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.

CircleCI Latest Stable Version Total Downloads License Monthly Downloads Daily Downloads composer.lock

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);