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/
51
51
52
52
# # Using Symfony cache
53
53
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 :
62
56
63
57
` ` ` yaml
64
58
# services.yml
65
59
app.simple_cache:
66
- class: Cache \B ridge \S impleCache \S impleCacheBridge
60
+ class: Symfony \C omponent \C ache \S imple \P sr6Cache
67
61
arguments: ['@app.cache.acme']
68
62
` ` `
69
63
70
- Then configure the framework and the bundle.
64
+ Then configure the framework and the bundle :
71
65
72
66
` ` ` yaml
73
67
# config.yml
@@ -87,3 +81,11 @@ bazinga_geocoder:
87
81
cache_lifetime: 3600
88
82
` ` `
89
83
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