This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Add craft config/cache
as a console command
#1607
Labels
enhancement
improvements to existing features
Something analogous to to the Laravel
artisan config:cache
would be really useful for production deployment: https://laravel.com/docs/master/configuration#configuration-cachingIt could combine all of the
craft/config
files into one cached file for faster loading, and take all of the PHPdotenv settings and coalesce them into this cached config file so that it could be loaded quickly, without having to parse the.env
for every request.As per the PHPdotenv docs:
This is a perfect type of thing to be added as a Craft console command via
craft config/cache
or such. If the cache file exists, great, use it, and don't parse anything incraft/config
. If it doesn't exist, parse as normal.You'd essentially just be preflighting something that's the same for every request, and eliminating unnecessary overhead.
The text was updated successfully, but these errors were encountered: