sebbacon/alaveteli — Issue #362: Interlock cache key can be too long
Author: sebbacon
Created: 2012-01-24 10:40:15+00:00
State: open

We cache in memcached (via interlock) using a cache key that includes the query. Sometimes the query is too long for interlock to use as a key. An example traceback:

A ActionView::TemplateError occurred in request#list:

key too long "www.whatdotheyknow.com-production:interlock::request:list:all:__latest_status-waiting_response_OR_latest_status-waiting_clarification_OR_waiting_classification-true_OR_latest_status-internal_review_OR_latest_status-gone_postal_OR_latest_status-error_message_OR_latest_status-requires_"
On line #17 of app/views/request/list.rhtml

14:

15:
16:

17: <% view_cache :ttl => 5.minutes.to_i, :tag => [@query, @page, I18n.locale] do %>
18: <% if @list_results.empty? %>
19:

<%= _('No requests of this sort yet.')%>

20: <% else %>