forked from Trustie/forgeplus
fixed 去掉统计缓存
This commit is contained in:
parent
aa364598a4
commit
d86ad96055
|
|
@ -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
|
||||
Loading…
Reference in New Issue