Revert "GRN2-xx: Migration Error now returns 500 and added the option to disable cache (#770)" (#774)

This reverts commit 9bd5a659d5.
This commit is contained in:
Jesus Federico 2019-08-29 12:08:28 -04:00 committed by GitHub
parent 459d0ed582
commit 1eddd564d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 5 deletions

View File

@ -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"

View File

@ -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(