﻿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
29202	KeyError in django-sites caching (race condition?)	Dominik George	nobody	"Django Version: 1.10.8
Python Version: 3.5.3

Relevant backtrace:

{{{
File
""/srv/www/teckids-website/venv/lib/python3.5/site-packages/django/contrib/sites/models.py""
in _get_site_by_id
  37.         return SITE_CACHE[site_id]

File ""/srv/www/teckids-website/venv/lib/python3.5/site-packages/multisite/hacks.py"" in
__getitem__
  124.             raise KeyError(key)
}}}

In theory, there cannot be a KeyError there, unless the cache is cleared while the method is running. The code does not seem to be thread-safe."	Bug	closed	contrib.sites	1.10	Normal	needsinfo			Unreviewed	0	0	0	0	0	0
