2017 © Pedro Peláez
 

library cache-component

cache component within the chilimatic framework

image

chilimatic/cache-component

cache component within the chilimatic framework

  • Monday, June 13, 2016
  • by chilimatic
  • Repository
  • 1 Watchers
  • 0 Stars
  • 62 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 11 % Grown

The README.md

cache-component

Build Status, (*1)

Currently there are 3 adapters:, (*2)

Memcached, Apcu and Memory, (*3)

It also comes with a singelton wrapper but you don't have to use it., (*4)

$cache = Cache::getInstance(['type' => chilimatic\lib\Cache\Engine\Adapter\Memory::class]);

If you want to use a Factory, (*5)

$cache = CacheFactory::make(chilimatic\lib\Cache\Engine\Adapter\Memory::class);

And ofc you can access them directly, (*6)

$cache = new chilimatic\lib\Cache\Engine\Adapter\Memory();

you can pass in arrays or stdClass it will transform it to an array anyway (nested too), (*7)

$cache = new chilimatic\lib\Cache\Engine\Adapter\Memcached([
    'server_list' => [[
        'host' => '127.0.0.1',
        'port' => 11211,
        'weight' => 1
    ]],
    'options' => [ // the options are per instance not per connection!
        Memcached::OPT_HASH => Memcached::HASH_MURMUR
    ]
]);

more about the possible options http://php.net/manual/en/memcached.constants.php, (*8)

$cache = new chilimatic\lib\Cache\Engine\Adapter\APCU();

one of the benefits of this library is that it actually allows you to see what theoretically stored within the caches, (*9)

$cache = chilimatic\lib\Cache\Engine\Adapter\Memory();

var_dump($cache->listEntries());

it has 1 dependency the chilimatic interfaces., (*10)

if you want to know how things work I recommend looking at the tests :), (*11)

The Versions

13/06 2016

dev-master

9999999-dev

cache component within the chilimatic framework

  Sources   Download

MIT

The Requires

 

by Jakob Oberhummer

13/06 2016

2.0.2

2.0.2.0

cache component within the chilimatic framework

  Sources   Download

MIT

The Requires

 

by Jakob Oberhummer

06/06 2016

2.0.1

2.0.1.0

cache component within the chilimatic framework

  Sources   Download

MIT

The Requires

 

by Jakob Oberhummer

04/05 2016

dev-feature/shmop-engine

dev-feature/shmop-engine

cache component within the chilimatic framework

  Sources   Download

MIT

The Requires

 

by Jakob Oberhummer

30/04 2016

dev-stable

dev-stable

cache component within the chilimatic framework

  Sources   Download

MIT

The Requires

 

by Jakob Oberhummer

30/04 2016

1.0.0

1.0.0.0

cache component within the chilimatic framework

  Sources   Download

MIT

The Requires

 

by Jakob Oberhummer