class Admin::DashboardController < ApplicationController
before_action -> { turbo_cache_control(no_cache: true) }
def show
@queue_depth = Sidekiq::Queue.new('default').size
@recent_errors = DeadLetter.order(id: :desc).limit(20)
end
end
Turbo Drive caches pages aggressively, which is usually great. For volatile admin dashboards (counts, queues, toggles) you often want no-cache to avoid confusing “stale UI” bugs. turbo_cache_control makes the intent explicit.