mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-26 12:08:47 +01:00
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:
parent
032affb00d
commit
9550b89b25
1 changed files with 2 additions and 1 deletions
|
|
@ -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">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue