Skip to content

Commit 9d9142f

Browse files
committed
minor #12904 [Cache] Custom pool (Guikingone)
This PR was merged into the 3.4 branch. Discussion ---------- [Cache] Custom pool Hi everyone 👋 It seems that when defining a custom pool, the documenation is talking about an array adapter when the used one is the filesystem, the question is, do we need to reword it as filesystem in the text of change the code? 🤔 Thanks for the feedback 🙂 Commits ------- a50bce3 [FIX] Custom pool
2 parents de8e112 + a50bce3 commit 9d9142f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

cache.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,13 +194,20 @@ You can also create more customized pools. All you need is an adapter:
194194
default_memcached_provider: 'memcached://localhost'
195195
pools:
196196
my_cache_pool:
197-
adapter: cache.adapter.filesystem
197+
provider: app.my_cache_chain_adapter
198198
cache.acme:
199199
adapter: cache.adapter.memcached
200200
cache.foobar:
201201
adapter: cache.adapter.memcached
202202
provider: 'memcached://user:password@example.com'
203203
204+
services:
205+
app.my_cache_chain_adapter:
206+
class: Symfony\Component\Cache\Adapter\ChainAdapter
207+
arguments:
208+
- ['@cache.array', '@cache.apcu', '@cache.my_redis']
209+
- 31536000 # One year
210+
204211
.. code-block:: xml
205212
206213
<!-- app/config/config.xml -->

0 commit comments

Comments
 (0)