-
Memoize a user's personal projects count · ab738645Yorick Peterse authored
The method User#projects_limit_left would run "personal_projects.count" but such a query is not memoized. As a result multiple calls to User#projects_limit_left would result in multiple COUNT(*) queries being executed. To work around this this commit adds User#personal_projects_count which simply memoizes the result of the COUNT(*) in an instance variable.
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
unreleased | Loading commit data... | |
archive.md | Loading commit data... |