diff options
-rw-r--r-- | app/controllers/request_controller.rb | 2 | ||||
-rw-r--r-- | app/models/info_request.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb index 428dc4c23..c732a4b32 100644 --- a/app/controllers/request_controller.rb +++ b/app/controllers/request_controller.rb @@ -44,7 +44,7 @@ class RequestController < ApplicationController end def show - if !Configuration::varnish_host.nil? + if !Configuration::varnish_host.blank? # If varnish is set up to accept PURGEs, then cache for a # long time long_cache diff --git a/app/models/info_request.rb b/app/models/info_request.rb index 47424e573..89893a396 100644 --- a/app/models/info_request.rb +++ b/app/models/info_request.rb @@ -1139,7 +1139,7 @@ public before_save :purge_in_cache def purge_in_cache - if !Configuration::varnish_host.nil? && !self.id.nil? + if !Configuration::varnish_host.blank? && !self.id.nil? # we only do this for existing info_requests (new ones have a nil id) path = url_for(:controller => 'request', :action => 'show', :url_title => self.url_title, :only_path => true, :locale => :none) req = PurgeRequest.find_by_url(path) |