Sha256: 8745e8fd6e9763532b1e4c9d5554252db653978655ef51cd464a72f5e805a171

Contents?: true

Size: 682 Bytes

Versions: 28

Compression:

Stored size: 682 Bytes

Contents

# frozen_string_literal: true

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

28 entries across 28 versions & 1 rubygems

Version Path
renalware-core-2.0.46 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.45 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.44 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.43 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.42 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.41 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.40 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.39 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.38 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.37 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.36 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.35 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.34 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.33 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.32 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.31 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.30 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.28 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.27 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.26 app/controllers/renalware/concerns/cache_busting.rb