We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f1f27e3 commit 1293f5cCopy full SHA for 1293f5c
readthedocs/projects/views/private.py
@@ -1,5 +1,7 @@
1
"""Project views for authenticated users."""
2
3
+from functools import lru_cache
4
+
5
import structlog
6
from django.conf import settings
7
from django.contrib import messages
@@ -149,6 +151,10 @@ def validate_primary_email(self, user):
149
151
dismissable=True,
150
152
)
153
154
+ # NOTE: This method is called twice, on .org it doesn't matter,
155
+ # as the queryset is straightforward, but on .com it
156
+ # does some extra work that results in several queries.
157
+ @lru_cache(maxsize=1)
158
def get_queryset(self):
159
return Project.objects.dashboard(self.request.user)
160
0 commit comments