Skip to content

Instantly share code, notes, and snippets.

cs278 /
Last active July 25, 2022 18:19
Compile Symfony cache on at build time

Compile Symfony cache at build time

This modification to your Symfony application allows the cache to be warmed at the time builds your application container. The usual advice is to warm the cache in the deploy hook, which can result in ~1 minute of downtime waiting for the cache. Given Symfony’s cache is compiled once and only needs updating if your application code changes, which is impossible on, this allows deployment downtime to be reduced to less than a second.