mirror of
https://github.com/System-End/hackatime.git
synced 2026-04-20 00:35:22 +00:00
Add caching to project duration turboframe
This commit is contained in:
parent
d82f75f586
commit
e913e1a336
1 changed files with 12 additions and 10 deletions
|
|
@ -1,12 +1,14 @@
|
|||
<%= turbo_frame_tag "project_durations" do %>
|
||||
<div class="project-durations">
|
||||
<ul>
|
||||
<% project_durations.each do |project| %>
|
||||
<li>
|
||||
<strong><%= project[:project] || "Unknown" %></strong>
|
||||
<%= short_time_detailed project[:duration] %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<%= cache ["project_durations", current_user.id], expires_in: 5.minute do %>
|
||||
<div class="project-durations">
|
||||
<ul>
|
||||
<% project_durations.each do |project| %>
|
||||
<li>
|
||||
<strong><%= project[:project] || "Unknown" %></strong>
|
||||
<%= short_time_detailed project[:duration] %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
Loading…
Add table
Reference in a new issue