Showing
2 changed files
with
8 additions
and
1 deletions
| @@ -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 |