fix caching of todo where [C] and [P] were not part of the invariant

thus the first generated todo was cached, leading to invalid todo in other views
This commit is contained in:
Reinier Balt 2012-12-05 16:38:39 +01:00
parent 032affb00d
commit 9550b89b25

View file

@ -9,7 +9,8 @@ parameters += "&_tag_name=#{@tag_name}" if @source_view == 'tag'
# invalidate the cache every day because of staleness or
# rendering of "due in x days" that change without touching updated at of the todo
cache [todo, current_user.date.strftime("%Y%m%d")] do
# also make different caches per source_view to handle difference in showing [C] and [P]
cache [todo, current_user.date.strftime("%Y%m%d"), @source_view] do
%>
<div id="<%= dom_id(todo) %>" class="item-container">
<div id="<%= dom_id(todo, 'line') %>" class="item-show">