Sha256: d5a2193ef2929298c1de6d8030643421c587fce3a0bf51a412a961803d5bd54a

Contents?: true

Size: 654 Bytes

Versions: 114

Compression:

Stored size: 654 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"
      response.headers["Pragma"] = "no-cache"
      response.headers["Expires"] = "Fri, 01 Jan 1990 00:00:00 GMT"
    end
  end
end

Version data entries

114 entries across 114 versions & 1 rubygems

Version Path
renalware-core-2.1.1 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.1.0 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.167 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.166 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.165 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.164 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.163 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.162 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.161 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.160 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.159 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.158 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.157 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.156 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.155 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.153 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.152 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.151 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.149 app/controllers/renalware/concerns/cache_busting.rb
renalware-core-2.0.148 app/controllers/renalware/concerns/cache_busting.rb