File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -51,23 +51,17 @@ You may use any adapter from [PHP-cache.com](http://www.php-cache.com/en/latest/
5151
5252# # Using Symfony cache
5353
54- Symfony 3.3 does not support SimpleCache, but fear not. You can use a bridge between PSR-6 and PSR-16. Install the
55- [bridge](https://github.com/php-cache/simple-cache-bridge) by :
56-
57- ` ` ` bash
58- composer require cache/simple-cache-bridge
59- ` ` `
60-
61- Then register a service :
54+ Symfony>=3.3 supports SimpleCache thanks to `Symfony\Component\Cache\Simple\Psr6Cache` adapter.
55+ Thus a service can be registered like so :
6256
6357` ` ` yaml
6458# services.yml
6559app.simple_cache:
66- class: Cache \B ridge \S impleCache \S impleCacheBridge
60+ class: Symfony \C omponent \C ache \S imple \P sr6Cache
6761 arguments: ['@app.cache.acme']
6862` ` `
6963
70- Then configure the framework and the bundle.
64+ Then configure the framework and the bundle :
7165
7266` ` ` yaml
7367# config.yml
@@ -87,3 +81,11 @@ bazinga_geocoder:
8781 cache_lifetime: 3600
8882` ` `
8983
84+ For older Symfony version, you can use a bridge between PSR-6 and PSR-16. Install the
85+ [bridge](https://github.com/php-cache/simple-cache-bridge) by :
86+
87+ ` ` ` bash
88+ composer require cache/simple-cache-bridge
89+ ` ` `
90+
91+ Then, in the service declaration you can use `Cache\Bridge\SimpleCache\SimpleCacheBridge` instead of `Symfony\Component\Cache\Simple\Psr6Cache`.
You can’t perform that action at this time.
0 commit comments