Skip to content

Instantly share code, notes, and snippets.

@cs278
cs278 / instructions.md
Last active July 25, 2022 18:19
Compile Symfony cache on Platform.sh at build time

Compile Symfony cache at build time

This modification to your Symfony application allows the cache to be warmed at the time Platform.sh 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 Platform.sh, this allows deployment downtime to be reduced to less than a second.

Assumptions