[patch] django.contrib.sites should cache to reduce queries like contenttypes does
As you did with the CONTENT_TYPE_CACHE I would suggest the same be applied with the django.contrib.sites app so that multiple calls to get current (and similar) are not extra queries
Attachments (3)
-
site_cache.diff (1.5 KB) - added by Matt Riggott 16 years ago.
-
Patch to add Site object caching to django.contrib.sites.models.SiteManager
-
sites_docs.diff (1.3 KB) - added by Matt Riggott 16 years ago.
-
Documentation on the caching and the Site.objects.clear_cache() method.
-
sites_docs.2.diff (1.3 KB) - added by Matt Riggott 15 years ago.
-
Formatting changes to the docs diff: lines wrapped at 80 characters and a "New in Django development version" notice added.
Download all attachments as: .zip
Change History (7)
Summary: |
Site Caching →
django.contrib.sites should cache to reduce queries like contenttypes does
|
Triage Stage: |
Unreviewed →
Accepted
|
Has patch: |
set
|
Summary: |
django.contrib.sites should cache to reduce queries like contenttypes does →
[patch] django.contrib.sites should cache to reduce queries like contenttypes does
|
Triage Stage: |
Accepted →
Ready for checkin
|
Resolution: |
→ fixed
|
Status: |
new →
closed
|
Where CONTENT_TYPE_CACHE is that which is implemented in django.contrib.contenttypes.models