Skip to content
Snippets Groups Projects
Commit 1c2b1299 authored by Andreas Nüßlein's avatar Andreas Nüßlein
Browse files

Notes regarding CACHE-Armageddon

parent cd387fac
No related branches found
No related tags found
No related merge requests found
......@@ -2465,6 +2465,7 @@ class QuestionnaireConfiguration(BaseConfigurationObject):
if self.configuration_object:
self.edition = self.configuration_object.edition
self.configuration_error = None
# TODO The following code hits the database 25.000+ times 🤯
try:
self.read_configuration()
except Exception as e:
......
......@@ -495,6 +495,7 @@ class Institution(models.Model):
key=settings.CONFIGURATION_CACHE_KEY_INSTITUTION_SELECT,
language=get_language(),
)
# TODO: This cache gets hit 2000+ times for a single /en/wocat/list
select = cache.get(cache_key)
if select is None:
select = [(i.id, str(i)) for i in Institution.objects.all()]
......
......@@ -19,7 +19,6 @@ follows ::
├── DJANGO_DEBUG
├── DJANGO_SETTINGS_MODULE
├── DJANGO_TEMPLATE_DEBUG
├── DJANGO_USE_CACHING
└── TESTING_FIREFOX_PATH
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment