From 74bb42109bd3e3302a633ff482a4a41f4929d811 Mon Sep 17 00:00:00 2001 From: Marwin Hochfelsner <50826859+hlfan@users.noreply.github.com> Date: Fri, 16 May 2025 23:36:22 +0200 Subject: [PATCH] Improve heatmap data caching --- app/controllers/users_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index e079da854..5bd4809be 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -24,7 +24,7 @@ class UsersController < ApplicationController if @user && (@user.visible? || current_user&.administrator?) @title = @user.display_name - @heatmap_data = Rails.cache.fetch("heatmap_data_of_user_#{@user.id}", :expires_in => 1.day) do + @heatmap_data = Rails.cache.fetch("heatmap_data_of_user_#{@user.id}", :expires_at => Time.zone.now.end_of_day) do one_year_ago = 1.year.ago.beginning_of_day today = Time.zone.now.end_of_day -- 2.39.5