discourse/app/services/upcoming_changes/action
Keegan George 0a55413ea4
PERF: Cache has_unseen_features? to avoid per-request git shell-outs (#39532)
Previously, `DiscourseUpdates.has_unseen_features?` ran the full new
features pipeline on every request for staff users — parsing JSON,
shelling out to `git merge-base` per entry via `GitUtils.has_commit?`,
merging with upcoming changes, and sorting — taking 300-400ms to produce
a single boolean.

In this update, the max `created_at` timestamp across all valid merged
features is computed once and cached in Redis, reducing
`has_unseen_features?` to two Redis GETs and an integer comparison; the
cache is invalidated when the daily job fetches new features, on
deploy/restart, and when an upcoming change transitions to permanent.
2026-04-24 10:16:46 -07:00
..
notification_data_merger.rb
notify_admins_of_available_change.rb FIX: Do not notify admins of upcoming changes on new sites (#38890) 2026-03-27 12:32:12 +10:00
track_notify_added_changes.rb DEV: Fix upcoming change notification flaky specs (#38914) 2026-03-27 15:03:23 +08:00
track_notify_status_changes.rb PERF: Cache has_unseen_features? to avoid per-request git shell-outs (#39532) 2026-04-24 10:16:46 -07:00
track_removed_changes.rb