仓库语言缓存随着项目数变化

This commit is contained in:
2023-04-27 09:29:13 +08:00
parent 1fb3865865
commit ba344e76ba

View File

@@ -88,7 +88,7 @@ class Organizations::OrganizationsController < Organizations::BaseController
projects = @organization.projects
projects_count = @organization.projects.count
languages_hash = Rails.cache.fetch("query/organizations/languages/#{@organization.id}", :expires_in => 1.days) do
languages_hash = Rails.cache.fetch("query/organizations/languages/#{@organization.id}/#{projects_count}", :expires_in => 1.days) do
total_languages(projects)
end