Skip to content
Commit 424d158b authored by Malcolm Tredinnick's avatar Malcolm Tredinnick
Browse files

[1.0.X] 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.

Backport of r9908 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9909 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent f7999590
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment