From d86ad96055486eff51fb7cdf97cd792e97fd572a Mon Sep 17 00:00:00 2001 From: xxq250 Date: Fri, 23 May 2025 09:23:22 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20=E5=8E=BB=E6=8E=89=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/home_controller.rb | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index 39e5750d0..ff9b167d8 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -1,17 +1,12 @@ class HomeController < ApplicationController def index - @user_count = Rails.cache.fetch("homecontroller:user_count", expires_in: 1.hours) do - User.count - end - @project_count = Rails.cache.fetch("homecontroller:project_count", expires_in: 1.hours) do - Project.count - end - @project_dataset_count = Rails.cache.fetch("homecontroller:project_dataset_count", expires_in: 1.hours) do - ProjectDataset.count - end - @commit_count = Rails.cache.fetch("homecontroller:commit_count", expires_in: 1.hours) do - CommitLog.count - end + @user_count = User.count + + @project_count = Project.count + + @project_dataset_count = ProjectDataset.count + + @commit_count = CommitLog.count end end \ No newline at end of file