Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'config/environments')
-rw-r--r--config/environments/development.rb2
-rw-r--r--config/environments/test.rb4
2 files changed, 2 insertions, 4 deletions
diff --git a/config/environments/development.rb b/config/environments/development.rb
index 9d4fc6ba5e9..31a3af77ba1 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -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
diff --git a/config/environments/test.rb b/config/environments/test.rb
index f3a7f894b73..4e359cd308c 100644
--- a/config/environments/test.rb
+++ b/config/environments/test.rb
@@ -17,9 +17,7 @@ Rails.application.configure do
# test suite. You never need to work with it otherwise. Remember that
# your test database is "scratch space" for the test suite and is wiped
# and recreated between test runs. Don't rely on the data there!
-
- # Code doesn't change in CI so we don't need code-reloading
- config.cache_classes = !!ENV['CI']
+ config.cache_classes = Gitlab::Utils.to_boolean(ENV['CACHE_CLASSES'], default: false)
# Configure static asset server for tests with Cache-Control for performance
config.assets.compile = false if ENV['CI']