2017 © Pedro Peláez
 

library cachekit

General cache interface

image

corneltek/cachekit

General cache interface

  • Sunday, December 29, 2013
  • by c9s
  • Repository
  • 2 Watchers
  • 7 Stars
  • 4,158 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 3 % Grown

The README.md

CacheKit

Generic cache interface for PHP., (*1)

CacheKit Interface

$c = new CacheKit;
$memory = $c->createBackend( 'MemoryCache' );

$c->set( 'foo' , 123 );

$memory->set( 'foo' , '123' );
$val = $memory->get('foo');

ApcCache Interface

$cache = new CacheKit\ApcCache(array( 
    'namespace' => 'app_',
    'default_expiry' => 3600,
));
$cache->set($name,$val);
$val = $cache->get($name);
$cache->remove($name);

FileSystemCache

$serializer = new SerializerKit\Serializer('json');
$cache = new CacheKit\FileSystemCache(array( 
    'expiry' => 30,
    'cache_dir' => 'cache',
    'serializer' => $serializer,
));
$cache->clear();

$url = 'foo_bar';
$html = 'test content';
$cache->set( $url , $html );

$cache->remove( $url );

ok( null === $cache->get( $url ) );

$cache->clear();

ok( null === $cache->get( $url ) );

The Versions

29/12 2013

dev-master

9999999-dev http://github.com/c9s/CacheKit

General cache interface

  Sources   Download

MIT

The Requires

 

The Development Requires

29/12 2013

1.0.0

1.0.0.0 http://github.com/c9s/CacheKit

General cache interface

  Sources   Download

MIT

The Requires

 

The Development Requires

29/12 2013

0.0.5

0.0.5.0 http://github.com/c9s/CacheKit

General cache interface

  Sources   Download

MIT

The Requires

 

The Development Requires