2017 © Pedro PelĂĄez
 

library doctrine-cache-service-provider

Doctrine Cache for Pimple

image

sergiors/doctrine-cache-service-provider

Doctrine Cache for Pimple

  • Monday, December 11, 2017
  • by sergiors
  • Repository
  • 4 Watchers
  • 6 Stars
  • 45,107 Installations
  • PHP
  • 4 Dependents
  • 1 Suggesters
  • 3 Forks
  • 0 Open issues
  • 10 Versions
  • 5 % Grown

The README.md

Doctrine Cache Service Provider

Build Status, (*1)

To see the complete documentation, check out Doctrine Cache, (*2)

Install

composer require sergiors/doctrine-cache-service-provider

How to use

use Sergiors\Pimple\Provider\DoctrineCacheServiceProvider;

$app->register(new DoctrineCacheServiceProvider(), [
    'cache.options' => [
        'driver' => 'redis',
        'namespace' => 'myapp',
        'host' => '{your_host}',
        'port' => '{your_portt}',
        // 'password' => ''
    ]
]);

// $app['cache']->save('cache_id', 'my_data');
// $app['cache']->fetch('cache_id');

Multiple instances

Something like this:, (*3)

use Sergiors\Pimple\Provider\DoctrineCacheServiceProvider;

$app->register(new DoctrineCacheServiceProvider(), [
    'caches.options' = [
        'conn1' => 'xcache',
        'conn2' => [
            'driver' => 'redis'
        ],
        'conn3' => [
            'driver' => 'array',
            'namespace' => 'test'
        ]
    ]
]);

// $app['caches']['conn1'];
// $app['caches']['conn2'];
// $app['caches']['conn3'];

Be Happy!, (*4)

License

MIT, (*5)

The Versions

11/12 2017
28/01 2016