From 6c1683f7d591a7f6347a0ac41f580a29c0ca2908 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Tue, 14 Apr 2015 16:57:44 +0800 Subject: [PATCH] rails menu cache removed --- app/helpers/application_helper.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 9080750..f05df9b 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -76,7 +76,7 @@ module ApplicationHelper end 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")) # @items = JSON.parse(json_file) if $mobile.blank? @@ -165,9 +165,9 @@ module ApplicationHelper end h = create_menu(@items,0) h.html_safe - end + # end - menu_html + # menu_html end def render_view