﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
28844	Sites cache is not multi-process safe	Bertrand Bordage	nobody	"The site cache, consisting on a dictionary, is thread safe.
However, changing the object within a process has no effect on other processes, unless you restart all processes.
Here is a minimal example.

In a first django shell:
{{{
>>> from django.contrib.sites.models import Site
>>> Site.objects.get_current()
<Site: mysite.com>
}}}
In a second one:
{{{
>>> from django.contrib.sites.models import Site
>>> site = Site.objects.get_current()
>>> site.domain = 'monsite.fr'
>>> site.save()
>>> Site.objects.get_current()
<Site: monsite.fr>
}}}
Then back in the first shell:
{{{
>>> Site.objects.get_current()
<Site: mysite.com>
}}}
The object is not changed.

I don’t think we can fix this without using cache backends. However, this caching must be disabled with the default `LocMem` cache, since it’s not multi-process safe."	Bug	closed	contrib.sites	dev	Normal	duplicate			Unreviewed	0	0	0	0	0	0
