Commit 91bc114f authored by Stan Hu's avatar Stan Hu

Make Rails code reloading configurable in development

For many frontend developers, code reloading is unnecessary and creates
more problems than it solves.

This commit adds a CACHE_CLASSES environment variable that can be
defined to disable code reloading. We do this as an environment variable
because this variable is most conveniently defined in the
`development.rb` and isn't needed in production.

Relates to
https://gitlab.com/gitlab-org/gitlab-development-kit/-/issues/794
parent 4c839b62
......@@ -4,7 +4,7 @@ Rails.application.configure do
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the web server when you make code changes.
config.cache_classes = false
config.cache_classes = Gitlab::Utils.to_boolean(ENV['CACHE_CLASSES'], default: false)
# Show full error reports and disable caching
config.active_record.verbose_query_logs = true
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment