diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2009-02-27 04:57:33 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2009-02-27 04:57:33 +0000 |
| commit | 0dd4ec654f4b22854df841d9ea8f463fdbdf99c3 (patch) | |
| tree | 84e15cddcd6f2c46eb1f35af3b4d5a2c68701b96 /django/utils/simplejson | |
| parent | 1306079a024ac7109487d2a560ceda3f842a4572 (diff) | |
Invalidate the appropriate SITE_CACHE entry when saving a Site model.
This avoids the problem of, for example, saving a change to the Site model in
the admin interface and then seeing the wrong instanec returned in the next
call to get_current_site().
It's still possible to end up with an inconsistent cache if update() is used to
change the Site model, but that's pretty unavoidable. It's also a slightly odd
way to update a Site model, so if you really need to do that, you can manage to
call SiteManager.clear() at the same time.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9908 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/utils/simplejson')
0 files changed, 0 insertions, 0 deletions
