2017 © Pedro Peláez
 

library cachecache

Caching library for PHP5.3

image

maximebf/cachecache

Caching library for PHP5.3

  • Sunday, September 8, 2013
  • by maximebf
  • Repository
  • 6 Watchers
  • 48 Stars
  • 39,429 Installations
  • PHP
  • 5 Dependents
  • 2 Suggesters
  • 8 Forks
  • 1 Open issues
  • 3 Versions
  • 6 % Grown

The README.md

CacheCache

Caching framework for PHP 5.3+, (*1)

Build Status, (*2)

Features:, (*3)

  • Easy retreival and storing of key, value pairs using the many available methods
  • Cache function calls
  • Available object wrapper to cache calls to methods
  • Pipelines ala Predis (see below)
  • Namespaces
  • TTL variations to avoid all caches to expire at the same time
  • Multiple backends support (apc, file, memcache(d), memory, redis, session)
  • Monolog support
  • Very well documented

CacheCache features are exposed through a Cache object which itself uses backends to store the data. Multiple instances of Cache objects can be managed using the CacheManager., (*4)

Full documentation at http://maximebf.github.com/CacheCache/, (*5)

Examples:, (*6)

$cache = new CacheCache\Cache(new CacheCache\Backends\Memory());

if (($foo = $cache->get('foo')) === null) {
    $foo = 'bar';
    $cache->set('foo', $foo);
}

if (!$cache->start('foo')) {
    echo "bar\n";
    $cache->end();
}

$cache->call('sleep', array(2));
$cache->call('sleep', array(2)); // won't sleep!

$r = $cache->pipeline(function($pipe) {
    $pipe->set('foo', 'bar');
    $pipe->set('bar', 'foo');
    $pipe->get('foo');
    $pipe->set('foo', 'foobar');
    $pipe->get('foo');
});

More examples in examples/, (*7)

The Versions

08/09 2013

dev-master

9999999-dev https://github.com/maximebf/CacheCache

Caching library for PHP5.3

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

cache

12/08 2013

1.0.2

1.0.2.0 https://github.com/maximebf/CacheCache

Caching library for PHP5.3

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

cache

18/08 2012

1.0.0

1.0.0.0 https://github.com/maximebf/CacheCache

Caching library for PHP5.3

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

cache