Showing
2 changed files
with
4 additions
and
7 deletions
| ... | ... | @@ -3,7 +3,7 @@ module Kanjai |
| 3 | 3 | |
| 4 | 4 | include Admin::PagesHelper |
| 5 | 5 | |
| 6 | - after_action :skip_set_cookies_header | |
| 6 | + #after_action :skip_set_cookies_header | |
| 7 | 7 | |
| 8 | 8 | |
| 9 | 9 | def show |
| ... | ... | @@ -38,17 +38,14 @@ module Kanjai |
| 38 | 38 | |
| 39 | 39 | #render :text => content_for_render and return |
| 40 | 40 | else |
| 41 | - #if stale?(@page_data, public: false) | |
| 42 | - #TODO NEED CHECK CACHE | |
| 43 | - #if stale?(last_modified: @page_data.last_modified, etag: @page_data.cache_key_with_version) | |
| 41 | + if stale?(last_modified: @page_data.last_modified, etag: @page_data.cache_key_with_version) | |
| 44 | 42 | layer = @page_data.page.page_template.get_html_content |
| 45 | 43 | content_for_render = setTemplateContent(@page_data.page.page_template, layer, @page_data) |
| 46 | 44 | respond_to do |format| |
| 47 | 45 | format.html{render :plain => content_for_render} |
| 48 | 46 | end |
| 49 | - #end | |
| 47 | + end | |
| 50 | 48 | end |
| 51 | - #render :html => content_for_render.html_safe | |
| 52 | 49 | else |
| 53 | 50 | page_content = get_html_by_json_client(@page_data) |
| 54 | 51 | render :html => page_content.html_safe and return | ... | ... |