Module: Workarea::HttpCaching

Extended by:
ActiveSupport::Concern
Included in:
ApplicationController, CurrentTracking
Defined in:
app/controllers/workarea/http_caching.rb

Instance Method Summary collapse

Instance Method Details

#cache_pageObject



10
11
12
13
14
15
16
# File 'app/controllers/workarea/http_caching.rb', line 10

def cache_page
  unless current_user.try(:admin?)
    expires_in Workarea.config.cache_expirations.http_cache, public: true if flash.blank?
    request.session_options[:skip] = true
    @http_caching = true
  end
end

#http_caching?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'app/controllers/workarea/http_caching.rb', line 18

def http_caching?
  !!@http_caching
end