docs(articles): Magento and Symfony examples side by side, request lifecycle as a Mermaid diagram
en/articles/magento-to-symfony/infrastructure/cache.md
+6
−1
1
1
# Cache
2
2
3
+
::::columns
4
+
:::col
3
5
**Magento** · CacheInterface
4
6
5
7
```php
13
15
14
16
$this->cache->clean(['faq']);
15
17
```
16
−
18
+
:::
19
+
:::col
17
20
**Symfony** · Cache Contracts
18
21
19
22
```php
29
32
30
33
$this->cache->invalidateTags(['faq']);
31
34
```
35
+
:::
36
+
::::
32
37
33
38
- `get()` with a callback protects against stampede: only one process runs the computation.
34
39
- Pools are defined in `framework.cache.pools`: a separate Redis for sessions, a separate one for data.