2017 © Pedro Peláez
 

library simplecache

simple cache classes

image

anoxgh/simplecache

simple cache classes

  • Saturday, May 30, 2015
  • by anox87
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

PHP SimpleCache

Install

Install via composer:, (*1)

{
    "require": {
        "anoxgh/simplecache": "dev-master"
    }
}

Run composer install then use as normal:, (*2)

Usage

$fileCache = new AnoxGH\SimpleCache\FileCache('Temporary/FileCache');
$fileCache->set('CacheKey', 'ExampleValue', 360);
var_dump($fileCache->get('CacheKey'));

$fileCache->flush('CacheKey');


$sessionCache = new AnoxGH\SimpleCache\SessionCache();
$sessionCache->set('CacheKey', 'ExampleValue', 360);

var_dump($sessionCache->get('CacheKey'));

$sessionCache->flush('CacheKey');

$apcCache = new AnoxGH\SimpleCache\ApcCache();
$apcCache->set('CacheKey', 'ExampleValue', 360);
var_dump($apcCache->get('CacheKey'));

$apcCache->flush('CacheKey');

$memoryCache = new AnoxGH\SimpleCache\MemoryCache();
$memoryCache->set('CacheKey', 'ExampleValue', 360);
var_dump($memoryCache->get('CacheKey'));

$memoryCache->flush('CacheKey');

$memCacheServer = array(
            array('127.0.0.1', 7000, 10),
            array('127.0.0.2', 7000, 20));

$memCache = new AnoxGH\SimpleCache\MemCache($memCacheServer);
$memCache->set('CacheKey', 'ExampleValue', 360);
var_dump($memCache->get('CacheKey'));

$memCache->flush('CacheKey');

Credits

PHP SimpleCache was created by Sebastian Gieselmann. Released under the GPL-2.0 license., (*3)

The Versions

30/05 2015

dev-master

9999999-dev

simple cache classes

  Sources   Download

GPL-2.0

The Requires

  • php >=5.3.0

 

by Sebastian Gieselmann