From 1eddd564d572e4bda5990dabcf95043a56edc56b Mon Sep 17 00:00:00 2001 From: Jesus Federico Date: Thu, 29 Aug 2019 12:08:28 -0400 Subject: [PATCH] Revert "GRN2-xx: Migration Error now returns 500 and added the option to disable cache (#770)" (#774) This reverts commit 9bd5a659d5bc572c9098fe108e21078bec24de68. --- config/application.rb | 3 --- lib/bbb_api.rb | 3 +-- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/config/application.rb b/config/application.rb index 5d91cf18..467bf900 100644 --- a/config/application.rb +++ b/config/application.rb @@ -118,9 +118,6 @@ module Greenlight config.google_analytics = ENV["GOOGLE_ANALYTICS_TRACKING_ID"].present? - # Will always be true unless explicitly set to false - config.enable_cache = ENV["ENABLE_CACHED_PROVIDER"] != "false" - # MAINTENANCE config.maintenance_window = ENV["MAINTENANCE_WINDOW"] config.maintenance_mode = ENV["MAINTENANCE_MODE"] == "true" diff --git a/lib/bbb_api.rb b/lib/bbb_api.rb index dedfdd88..1b2f0c49 100644 --- a/lib/bbb_api.rb +++ b/lib/bbb_api.rb @@ -28,8 +28,7 @@ module BbbApi raise "Provider not included." if !provider || provider.empty? cached_provider = Rails.cache.fetch("#{provider}/#{route}") - # Return cached result if the value exists and cache is enabled - return cached_provider if !cached_provider.nil? && Rails.configuration.enable_cache + return cached_provider unless cached_provider.nil? # Build the URI. uri = encode_bbb_url(