Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Django cache in production #1334

Merged
merged 3 commits into from
Oct 26, 2023
Merged

Enable Django cache in production #1334

merged 3 commits into from
Oct 26, 2023

Conversation

psiemens
Copy link
Member

@psiemens psiemens commented Oct 25, 2023

What problem does this PR solve?

Closes #1332

On the homepage, this reduces the number of database queries from 640 to 503.

How did you fix the problem?

  • Replaced DummyCache with LocMemCache. This is the default cached that Django uses if none is specified.
  • Added the django.template.loaders.cached.Loader template loader. Django caches templates by default but only if loaders isn't specified, so we need to explicitly configure it in our settings.

@psiemens psiemens changed the title Enable cache in production Enable Django cache in production Oct 25, 2023
@SamuelmdLow SamuelmdLow merged commit 934712c into develop Oct 26, 2023
3 of 4 checks passed
@psiemens psiemens deleted the perf-enable-cache branch October 26, 2023 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configure site to use a real cache backend
2 participants