Commit ee4733dd authored by David Fernandez's avatar David Fernandez

Merge branch 'sh-memoize-namespace-usage' into 'master'

Memoize namespace monthly usage to reduce SQL queries

See merge request gitlab-org/gitlab!68219
parents 40a2b67e f558ca40
......@@ -58,8 +58,10 @@ module Ci
end
def namespace_usage
strong_memoize(:namespace_usage) do
::Ci::Minutes::NamespaceMonthlyUsage.find_or_create_current(namespace_id: @namespace_id)
end
end
def project_usage
strong_memoize(:project_usage) do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment