vesica/cacher

This package is abandoned and no longer maintained. No replacement package was suggested.

A simplified caching library built on top of php-cache

1.4 2019-09-27 10:44 UTC

This package is auto-updated.

Last update: 2022-07-15 12:49:49 UTC


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.

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