From f6faab935392c4a07d9f83771ebee3b90cfc5407 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 25 Jun 2019 18:21:50 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E7=BC=93=E5=AD=98=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/edu_setting.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/edu_setting.rb b/app/models/edu_setting.rb index 4b39dea81..aadb6540c 100644 --- a/app/models/edu_setting.rb +++ b/app/models/edu_setting.rb @@ -20,6 +20,6 @@ class EduSetting < ApplicationRecord private def expire_value_cache - Rails.cache.clear(value_cache_key) + Rails.cache.write(value_cache_key, nil) end end From 264ffe91439482092b9a19dccc8823f7d825c9cd Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 25 Jun 2019 18:40:02 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BC=93=E5=AD=98?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/edu_setting.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/edu_setting.rb b/app/models/edu_setting.rb index aadb6540c..835aaec76 100644 --- a/app/models/edu_setting.rb +++ b/app/models/edu_setting.rb @@ -20,6 +20,6 @@ class EduSetting < ApplicationRecord private def expire_value_cache - Rails.cache.write(value_cache_key, nil) + Rails.cache.write(value_cache_key, value) end end From 81e25bd77cd32bc41564940a461255b4391e74d8 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Wed, 26 Jun 2019 09:06:53 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=BC=80=E5=8F=91=E7=A4=BE=E5=8C=BA?= =?UTF-8?q?=E9=A6=96=E9=A1=B5=E7=9A=84=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/shixuns/index.json.jbuilder | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/views/shixuns/index.json.jbuilder b/app/views/shixuns/index.json.jbuilder index 41da7120f..8e5d49a34 100644 --- a/app/views/shixuns/index.json.jbuilder +++ b/app/views/shixuns/index.json.jbuilder @@ -1,7 +1,8 @@ -if @fuzzy_searchs - json.keyword @fuzzy_searchs - json.total_count @fuzzy_searchs.blank? ? nil : @total_count -end +# if @fuzzy_searchs +# json.keyword @fuzzy_searchs +# json.total_count @fuzzy_searchs.blank? ? nil : @total_count +# end +json.total_count @total_count json.pagination @total_count > 16 ? true : false json.search_tags @search_tags json.shixuns do