Skip to content

Commit

Permalink
v0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevinrob committed Sep 19, 2015
1 parent 1c34347 commit 3f6e751
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This project is under development but it's already functional.

## Installation

`composer require kevinrob/guzzle-cache-middleware:~0.6`
`composer require kevinrob/guzzle-cache-middleware`

or add it the your `composer.json` and make a `composer update kevinrob/guzzle-cache-middleware`.

Expand Down Expand Up @@ -44,13 +44,13 @@ You can use a cache from `Doctrine/Cache`:
[...]
use Doctrine\Common\Cache\FilesystemCache;
use Kevinrob\GuzzleCache\Strategy\PrivateCacheStrategy;
use Kevinrob\GuzzleCache\Storage\DoctrineCacheWrapper;
use Kevinrob\GuzzleCache\Storage\DoctrineCacheStorage;

[...]
$stack->push(
new CacheMiddleware(
new PrivateCacheStrategy(
new DoctrineCacheWrapper(
new DoctrineCacheStorage(
new FilesystemCache('/tmp/')
)
)
Expand All @@ -66,12 +66,12 @@ use Doctrine\Common\Cache\ChainCache;
use Doctrine\Common\Cache\ArrayCache;
use Doctrine\Common\Cache\FilesystemCache;
use Kevinrob\GuzzleCache\Strategy\PrivateCacheStrategy;
use Kevinrob\GuzzleCache\Storage\DoctrineCacheWrapper;
use Kevinrob\GuzzleCache\Storage\DoctrineCacheStorage;

[...]
$stack->push(new CacheMiddleware(
new PrivateCacheStrategy(
new DoctrineCacheWrapper(
new DoctrineCacheStorage(
new ChainCache([
new ArrayCache(),
new FilesystemCache('/tmp/'),
Expand All @@ -87,14 +87,14 @@ It's possible to add a public shared cache to the stack:
use Doctrine\Common\Cache\FilesystemCache;
use Doctrine\Common\Cache\PredisCache;
use Kevinrob\GuzzleCache\Strategy\PrivateCacheStrategy;
use Kevinrob\GuzzleCache\Storage\DoctrineCacheWrapper;
use Kevinrob\GuzzleCache\Storage\DoctrineCacheStorage;

[...]
// Private caching
$stack->push(
new CacheMiddleware(
new PrivateCacheStrategy(
new DoctrineCacheWrapper(
new DoctrineCacheStorage(
new FilesystemCache('/tmp/')
)
)
Expand All @@ -106,7 +106,7 @@ $stack->push(
$stack->push(
new CacheMiddleware(
new PrivateCacheStrategy(
new DoctrineCacheWrapper(
new DoctrineCacheStorage(
new PredisCache(
new Predis\Client('tcp://10.0.0.1:6379')
)
Expand Down

0 comments on commit 3f6e751

Please sign in to comment.