Skip to content

Commit

Permalink
Added little note for potential performance improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbaldwin committed Sep 21, 2020
1 parent 20b51b9 commit 592cf3b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions figures/sites.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,13 @@ def get_organizations_for_site(site):


def get_course_keys_for_site(site):
"""
Developer note: We could improve this function with caching
Question is which is the most efficient way to know cache expiry
We may also be able to reduce the queries here to also improve performance
"""
if figures.helpers.is_multisite():
orgs = organizations.models.Organization.objects.filter(sites__in=[site])
org_courses = organizations.models.OrganizationCourse.objects.filter(
Expand Down

0 comments on commit 592cf3b

Please sign in to comment.