@@ -370,11 +370,21 @@ and use that when configuring the pool.
370
370
Creating a Cache Chain
371
371
----------------------
372
372
373
- Different cache adapters have different strengths and weaknesses. Some might be really
374
- quick but small and some may be able to contain a lot of data but are quite slow.
375
- To get the best of both worlds you may use a chain of adapters. The idea is to
376
- first look at the quick adapter and then move on to slower adapters. In the worst
377
- case the value needs to be recalculated.
373
+ Different cache adapters have different strengths and weaknesses. Some might be
374
+ really quick but optimized to store small items and some may be able to contain
375
+ a lot of data but are quite slow. To get the best of both worlds you may use a
376
+ chain of adapters.
377
+
378
+ A cache chain combines several cache pools into a single one. When storing an
379
+ item in a cache chain, Symfony stores it in all pools sequentially. When
380
+ retrieving an item, Symfony tries to get it from the first pool. If it's not
381
+ found, it tries the next pools until the item is found or an exception is thrown.
382
+ Because of this behavior, it's recommended to define the adapters in the chain
383
+ in order from the fastest to the slowest.
384
+
385
+ If an error happens when storing an item in a pool, Symfony stores it in the
386
+ other pools and no exception is thrown. Later, when the item is retrieved,
387
+ Symfony stores the item automatically in all the missing pools.
378
388
379
389
.. configuration-block ::
380
390
@@ -470,7 +480,7 @@ the same key could be invalidate with one function call::
470
480
}
471
481
}
472
482
473
- The cache adapter needs to implement :class: `Symfony\\ Contracts\\ Cache\\ TagAwareCacheInterface` `
483
+ The cache adapter needs to implement :class: `Symfony\\ Contracts\\ Cache\\ TagAwareCacheInterface `
474
484
to enable this feature. This could be added by using the following configuration.
475
485
476
486
.. configuration-block ::
0 commit comments