Skip to content

Strategy for caching config in multi-container deployed apps with blue green deployments? #55042

Closed Answered by mbabker
macropay-solutions asked this question in Q&A
Discussion options

You must be logged in to vote

The config:cache command generates a file at bootstrap/cache/config.php, it doesn't use the framework's cache component at all. Caching the config (or any of the caches warmed up through the optimize command) has nothing to do with data cached using the Cache component, think of it more as a "cache this data that shouldn't change over the lifetime of a deployment" warmup step as you push a deployment live.

Where this could cause problems is if you're caching the config at a point before the real values are set, i.e. something's being configured by an env var but those env vars aren't set in your build process; the config:cache command in Laravel is just a simple var_export($config, true)

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
1 reply
@macropay-solutions
Comment options

Comment options

You must be logged in to vote
6 replies
@macropay-solutions
Comment options

@mbabker
Comment options

@macropay-solutions
Comment options

@mbabker
Comment options

Answer selected by macropay-solutions
@macropay-solutions
Comment options

@macropay-solutions
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants