2017 © Pedro Peláez
 

library cacheserviceprovider

image

germania-kg/cacheserviceprovider

  • Monday, February 5, 2018
  • by germania-kg
  • Repository
  • 2 Watchers
  • 0 Stars
  • 16 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Germania KG · CacheServiceProvider

Pimple Service Provider for creating phpFastCache services, (*1)

Packagist PHP version Build Status Scrutinizer Code Quality Code Coverage Build Status, (*2)

Installation with Composer

$ composer require germania-kg/cacheserviceprovider

Setup

<?php
use Germania\CacheServiceProvider\CacheServiceProvider;

// A. Use with Slim or Pimple
$app = new \Slim\App;
$dic = $app->getContainer();
$dic = new Pimple\Container;

// B. Register Service Provider, 
// Defaults are unsecure!
$csp = new CacheServiceProvider( );
$csp = new CacheServiceProvider( sys_get_tmp_dir(), 3600);

// Pass custom cache directoy and lifetime (seconds)
$csp = new CacheServiceProvider( "path/to/cache", 3600);

// or, leave at defaults: 
$dic->register( $csp  );

Services

Cache.ItemPool

Returns a phpFastCache instance., (*3)

$itempool = $dic['Cache.ItemPool'];

Development

$ git clone https://github.com/GermaniaKG/CacheServiceProvider.git
$ cd CacheServiceProvider
$ composer install

Unit tests

Either copy phpunit.xml.dist to phpunit.xml and adapt to your needs, or leave as is. Run PhpUnit test or composer scripts like this:, (*4)

$ composer test
# or
$ vendor/bin/phpunit

The Versions

05/02 2018

dev-develop

dev-develop

  Sources   Download

proprietary

The Requires

 

The Development Requires

by Carsten Witt

05/02 2018

dev-master

9999999-dev

  Sources   Download

proprietary

The Requires

 

The Development Requires

by Carsten Witt

05/02 2018
05/02 2018
05/02 2018