diff options
author | Robin Houston <robin.houston@gmail.com> | 2012-01-19 15:57:24 +0000 |
---|---|---|
committer | Robin Houston <robin.houston@gmail.com> | 2012-01-19 15:57:24 +0000 |
commit | 3e84062e1136e3e20c5b0948813397982f254f95 (patch) | |
tree | bc19a61f628f66d12812a4041c763f73ba06aaf3 | |
parent | 1c04827eae7600da1639f5bd98f55206c1cbf7b5 (diff) |
Don't obscure user searches on request listing page behind cache. Fixes #256
-rw-r--r-- | app/controllers/request_controller.rb | 2 | ||||
-rw-r--r-- | app/views/request/list.rhtml | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb index aeb6d31fe..7bc51bc28 100644 --- a/app/controllers/request_controller.rb +++ b/app/controllers/request_controller.rb @@ -166,7 +166,7 @@ class RequestController < ApplicationController query = make_query_from_params @title = _("View and search requests") sortby = "newest" - behavior_cache :tag => [@view, @page] do + behavior_cache :tag => [@query, @page, I18n.locale] do xapian_object = perform_search([InfoRequestEvent], query, sortby, 'request_collapse') @list_results = xapian_object.results.map { |r| r[:model] } @matches_estimated = xapian_object.matches_estimated diff --git a/app/views/request/list.rhtml b/app/views/request/list.rhtml index 63faf3643..862d03828 100644 --- a/app/views/request/list.rhtml +++ b/app/views/request/list.rhtml @@ -14,7 +14,7 @@ <div style="clear:both"></div> <div class="results_section"> - <% view_cache :ttl => 5.minutes.to_i, :tag => [@view, @page, I18n.locale] do %> + <% view_cache :ttl => 5.minutes.to_i, :tag => [@query, @page, I18n.locale] do %> <% if @list_results.empty? %> <p> <%= _('No requests of this sort yet.')%></p> <% else %> |