2017 © Pedro Peláez
 

library phpcache

Avanced cache manager for PHP. Driver : xcache and wincache

image

mactronique/phpcache

Avanced cache manager for PHP. Driver : xcache and wincache

  • Wednesday, November 9, 2016
  • by Macintosh_plus
  • Repository
  • 1 Watchers
  • 1 Stars
  • 419 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 7 Versions
  • 7 % Grown

The README.md

phpcache

Build Status Dependency Status Latest Stable Version Latest Unstable Version License, (*1)

Supported driver

  • xCache
  • WinCache
  • Predis
  • Redis
  • Memcached
  • Null (special for instanciate no effect cache driver)

Install

``` shell php composer.phar require mactronique/phpcache "~1.0", (*2)


## Configuration ### for xCache No configuration need. ### for WinCache No configuration need. ### for Null No configuration need. ### For Predis ``` php $config = array( "host" => "127.0.0.1", "port" => "", "password" => "", "database" => "", "timeout" => 1, "read_write_timeout" => 1 );

Only host key is required., (*3)

For Redis

``` php $config = array( "host" => "127.0.0.1", "port" => "", "password" => "", "database" => "", "timeout" => 1 );, (*4)


Only `host` key is required. ## For Redis ``` php $config = array( "host" => "127.0.0.1", "port" => 11211, "sharing" => 100 );

Only host key is required., (*5)

Example of use NullDriver

This code is example of service class, (*6)

``` php use Mactronique\PhpCache\Service\PhpCache; use Mactronique\PhpCache\Driver\NullDriver;, (*7)

class myService { private $cache public function __construct(PhpCache $cache = null) { if (null === $cache) { $cache = new PhpCache(); $cache->registerDriver(new NullDriver()); } $this->cache = $cache; }, (*8)

public function myAction()
{
    /*
    You can use the cache but never key exist and all get return null.
    */
    $val = $this->cache->get('key');
    [...]
}

}, (*9)

```, (*10)

The Versions

09/11 2016

dev-master

9999999-dev

Avanced cache manager for PHP. Driver : xcache and wincache

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Jean-Baptiste Nahan

09/11 2016

1.0.5

1.0.5.0

Avanced cache manager for PHP. Driver : xcache and wincache

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Jean-Baptiste Nahan

01/09 2016

1.0.4

1.0.4.0

Avanced cache manager for PHP. Driver : xcache and wincache

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jean-Baptiste Nahan

12/10 2015

1.0.3

1.0.3.0

Avanced cache manager for PHP. Driver : xcache and wincache

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jean-Baptiste Nahan

08/10 2015

1.0.2

1.0.2.0

Avanced cache manager for PHP. Driver : xcache and wincache

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jean-Baptiste Nahan

28/07 2015

1.0.1

1.0.1.0

Avanced cache manager for PHP. Driver : xcache and wincache

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jean-Baptiste Nahan

23/07 2015

1.0.0

1.0.0.0

Avanced cache manager for PHP. Driver : xcache and wincache

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jean-Baptiste Nahan