rails menu cache removed

This commit is contained in:
Harry Bomrah 2015-04-14 16:57:44 +08:00
parent 0b787a1067
commit 6c1683f7d5
1 changed files with 3 additions and 3 deletions

View File

@ -76,7 +76,7 @@ module ApplicationHelper
end end
def render_menu def render_menu
menu_html = Rails.cache.fetch(['main_menu',request.original_fullpath, I18n.locale], race_condition_ttl: 2.seconds) do # menu_html = Rails.cache.fetch(['main_menu',request.original_fullpath, I18n.locale], race_condition_ttl: 2.seconds) do
# json_file = File.read(File.join(Rails.root, 'public', "menu.json")) # json_file = File.read(File.join(Rails.root, 'public', "menu.json"))
# @items = JSON.parse(json_file) # @items = JSON.parse(json_file)
if $mobile.blank? if $mobile.blank?
@ -165,9 +165,9 @@ module ApplicationHelper
end end
h = create_menu(@items,0) h = create_menu(@items,0)
h.html_safe h.html_safe
end # end
menu_html # menu_html
end end
def render_view def render_view