Commit 2abd42b9614badbaf36e66854903e56d539ba0bf

Authored by Karpikau Andrei
1 parent 38e41606

play with cache

... ... @@ -28,7 +28,6 @@ module Kanjai
28 28 end
29 29 end
30 30
31   -
32 31 if current_admin_user || @page_data.page.private_flag == true || use_cache == false
33 32 layer = @page_data.page.page_template.get_html_content
34 33 content_for_render = setTemplateContent(@page_data.page.page_template, layer, @page_data)
... ... @@ -40,11 +39,14 @@ module Kanjai
40 39 #render :text => content_for_render and return
41 40 else
42 41 #if stale?(@page_data, public: false)
43   - if stale?(last_modified: @page_data.last_modified, etag: @page_data.etag_cache_key)
  42 + #TODO NEED CHECK CACHE
  43 + #if stale?(last_modified: @page_data.last_modified, etag: @page_data.cache_key_with_version)
44 44 layer = @page_data.page.page_template.get_html_content
45 45 content_for_render = setTemplateContent(@page_data.page.page_template, layer, @page_data)
46   - render :plain => content_for_render and return
47   - end
  46 + respond_to do |format|
  47 + format.html{render :plain => content_for_render}
  48 + end
  49 + #end
48 50 end
49 51 #render :html => content_for_render.html_safe
50 52 else
... ...
1 1 module Kanjai
2   - VERSION = "0.0.137"
  2 + VERSION = "0.0.138"
3 3 end
... ...