Sha256: 143d94ad187002ebf2ddd1b7a9ac23803799eab59e2d5d7825d8bedf52d38b01

Contents?: true

Size: 651 Bytes

Versions: 18

Compression:

Stored size: 651 Bytes

Contents

require "active_support/concern"

# The host Rails application's ApplicationController could choose to mix-in this concern in order to
# prevent the browser from being able navigate Back to logged-in pages once the user has logged out.
module Renalware
  module Concerns::CacheBusting
    extend ActiveSupport::Concern

    included do
      class_eval do
        before_action :bust_cache
      end
    end

    def bust_cache
      response.headers["Cache-Control"] = "no-cache, no-store, max-age=0, must-revalidate"
      response.headers["Pragma"] = "no-cache"
      response.headers["Expires"] = "Fri, 01 Jan 1990 00:00:00 GMT"
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
renalware-core-2.0.16 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.15 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.14 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.13 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.12 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.11 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.9 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.8 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.7 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.5 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.4 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.3 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.2 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.1 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.0 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.0.pre.rc13 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.0.pre.rc11 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.0.pre.rc10 app/controllers/renalware/concerns/cache_busting.rb