From 4f1c5ee1136725a12aff81d425bc5d6dffdb434b Mon Sep 17 00:00:00 2001 From: Jorge Manrubia Date: Tue, 9 Sep 2025 12:39:28 +0200 Subject: [PATCH] Add http caching to notifications --- app/controllers/notifications/trays_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/notifications/trays_controller.rb b/app/controllers/notifications/trays_controller.rb index 7c7a52bb3..4a7e9ca62 100644 --- a/app/controllers/notifications/trays_controller.rb +++ b/app/controllers/notifications/trays_controller.rb @@ -1,5 +1,7 @@ class Notifications::TraysController < ApplicationController def show @notifications = Current.user.notifications.unread.ordered.limit(100) + + fresh_when @notifications end end