Stack Matrix Hub (9)
Doctrine Second-Level Cache & Symfony Cache on Redis 7.2
Cache immutable Sylius channels, currencies, locales, and tax categories in Redis RAM to cut database round-trips by 30%.
256-512 MB Redis RAM · 22-30% fewer SQL queries · Sub-ms Unix socket
Targeting High-Read Reference Tables Without Stale Inventory
Every Sylius request queries channel, locale, currency, zone, and tax rate tables. Placing read-only or non-strict read-write Doctrine second-level cache over these reference entities removes 22-30% of repetitive SQL reads while keeping stock and order tables strictly transactional.
Configuring Redis Eviction & Dedicated Key Prefixes
Allocate 256 to 768 MB to Redis with maxmemory-policy allkeys-lru for cache pools, and isolate Messenger streams or Symfony Lock keys in a separate Redis database or non-evicting instance.
Measured Thresholds & Configuration
| Redis Workload Pool | Recommended Eviction Policy | Memory Budget (50k SKU) | Impact on Sylius Latency |
|---|---|---|---|
| cache.app / Doctrine L2 | allkeys-lru | 256 - 512 MB | -25% DB CPU & faster TTFB |
| Symfony Sessions | volatile-lru or noeviction | 128 - 256 MB | Stateless multi-worker auth |
| Messenger + Checkout Locks | noeviction | 128 - 256 MB | Zero dropped async jobs |