2017 © Pedro Peláez
 

library psr-6-doctrine-bridge-universal-module

Cross-framework module for cache/psr-6-doctrine-bridge

image

thecodingmachine/psr-6-doctrine-bridge-universal-module

Cross-framework module for cache/psr-6-doctrine-bridge

  • Monday, September 25, 2017
  • by mouf
  • Repository
  • 6 Watchers
  • 0 Stars
  • 17,165 Installations
  • PHP
  • 1 Dependents
  • 1 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 32 % Grown

The README.md

Build Status Coverage Status, (*1)

PSR6 to Doctrine cache universal module

This package integrates cache/psr-6-doctrine-bridge (the bridge between Doctrine cache and PSR-6) in any container-interop/service-provider compatible framework/container., (*2)

Installation

composer require thecodingmachine/psr-6-doctrine-bridge-universal-module

Once installed, you need to register the TheCodingMachine\DoctrineCacheBridgeServiceProvider into your container., (*3)

If your container supports thecodingmachine/discovery integration, you have nothing to do. Otherwise, refer to your framework or container's documentation to learn how to register service providers., (*4)

Introduction

This service provider will provide a default Doctrine cache implementation based on the already configured PSR-6 cache., (*5)

It assumes there is already a configured service providing a PSR-6 cache pool. You can install a service provider providing this service using:, (*6)

composer require thecodingmachine/stash-universal-module

(this will install Stash and its related service-provider. Stash is a PSR-6 caching library), (*7)

Usage

use Doctrine\Common\Cache\CacheProvider;

$cachePool = $container->get(CacheProvider::class);
echo $cachePool->get('my_cached_value');

Expected values / services

This service provider expects the following configuration / services to be available:, (*8)

Name Compulsory Description
CacheItemPoolInterface::class yes A PSR-6 compatible cache pool.

Provided services

This service provider provides the following services:, (*9)

Service name Description
Doctrine\Common\Cache\CacheProvider A Doctrine cache, this is actually a bridge to the PSR-6 pool.
Doctrine\Common\Cache\Cache An alias to the CacheProvider.

Extended services

This service provider does not extend any service., (*10)

The Versions