Commit 65f72ad750d67faa84a9f79e8bcd265acc70b87d

Authored by Karpikau Andrei
1 parent 640554f8

remove cache from admin part

@@ -12,6 +12,7 @@ module Kanjai @@ -12,6 +12,7 @@ module Kanjai
12 12
13 before_action :authenticate_admin_user! 13 before_action :authenticate_admin_user!
14 before_action :set_locale 14 before_action :set_locale
  15 + before_action :set_cache_headers
15 16
16 after_action :prepare_unobtrusive_flash 17 after_action :prepare_unobtrusive_flash
17 18
@@ -21,5 +22,11 @@ module Kanjai @@ -21,5 +22,11 @@ module Kanjai
21 I18n.locale = :en 22 I18n.locale = :en
22 end 23 end
23 24
  25 + def set_cache_headers
  26 + response.headers["Cache-Control"] = "no-cache, no-store"
  27 + response.headers["Pragma"] = "no-cache"
  28 + response.headers["Expires"] = "Mon, 01 Jan 1990 00:00:00 GMT"
  29 + end
  30 +
24 end 31 end
25 end 32 end
1 module Kanjai 1 module Kanjai
2 - VERSION = "0.0.229" 2 + VERSION = "0.0.230"
3 end 3 end