diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-12-20 09:33:02 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-12-20 09:33:02 +0000 |
commit | 717f491f503d214b639f5b98e497e4189fc34902 (patch) | |
tree | 9fcf57ecc6ef31fd43c03b294906b036c03aa285 /app/controllers/search_controller.rb | |
parent | 71172e241169933bbec364afe9268b4b36d9045f (diff) | |
download | redmine-717f491f503d214b639f5b98e497e4189fc34902.tar.gz redmine-717f491f503d214b639f5b98e497e4189fc34902.zip |
Cache search result ids for faster search pagination (#18631).
git-svn-id: http://svn.redmine.org/redmine/trunk@13770 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/search_controller.rb')
-rw-r--r-- | app/controllers/search_controller.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb index ac52f42b6..3f80b18b0 100644 --- a/app/controllers/search_controller.rb +++ b/app/controllers/search_controller.rb @@ -18,8 +18,6 @@ class SearchController < ApplicationController before_filter :find_optional_project - @@search_cache_store ||= ActiveSupport::Cache.lookup_store :memory_store - def index @question = params[:q] || "" @question.strip! @@ -57,7 +55,7 @@ class SearchController < ApplicationController fetcher = Redmine::Search::Fetcher.new( @question, User.current, @scope, projects_to_search, - :all_words => @all_words, :titles_only => @titles_only + :all_words => @all_words, :titles_only => @titles_only, :cache => params[:page].present? ) if fetcher.tokens.present? |