PHPackages                             euskadi31/cache-service-provider - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. euskadi31/cache-service-provider

ActiveLibrary[Caching](/categories/caching)

euskadi31/cache-service-provider
================================

A Cache Service Provider for Silex 2.0, using the doctrine/cache package

v1.0(10y ago)05321MITPHP

Since Jun 17Pushed 10y ago1 watchersCompare

[ Source](https://github.com/euskadi31/CacheServiceProvider)[ Packagist](https://packagist.org/packages/euskadi31/cache-service-provider)[ RSS](/packages/euskadi31-cache-service-provider/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (1)

Silex Cache Service Provider
============================

[](#silex-cache-service-provider)

[![Build Status](https://camo.githubusercontent.com/5ac554d19b3878e64c1153f1c6bae6cf80c30a74d343c64e8d486442a7b21225/68747470733a2f2f7472617669732d63692e6f72672f6575736b61646933312f43616368655365727669636550726f76696465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/euskadi31/CacheServiceProvider)[![SensioLabsInsight](https://camo.githubusercontent.com/b4b943954f78018e9c4dfab8ca2312843552d423667da265b253d1632abb9b58/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f65316365373030392d613861642d346438332d626466382d3435663335636534393232662f6d696e692e706e67)](https://insight.sensiolabs.com/projects/e1ce7009-a8ad-4d83-bdf8-45f35ce4922f)

This service provider for Silex 2.0 uses the Cache classes from Doctrine Common to provide a cache service to a Silex application, and other service providers.

Install
-------

[](#install)

Add `euskadi31/cache-service-provider` to your `composer.json`:

```
% php composer.phar require euskadi31/cache-service-provider:~1.0

```

Usage
-----

[](#usage)

### Configuration

[](#configuration)

If you only need one application wide cache, then it's sufficient to only define a default cache, by setting the `default` key in `cache.options`.

The cache definition is an array of options, with `driver` being the only mandatory option. All other options in the array, are treated as constructor arguments to the driver class.

The cache named `default` is the cache available through the app's `cache` service.

```
