Skip to content

Commit

Permalink
Merge pull request #1337 from ubyssey/perf-image-renditions-cache
Browse files Browse the repository at this point in the history
Add Wagtail image renditions cache
  • Loading branch information
SamuelmdLow authored Oct 30, 2023
2 parents e1fec6a + 3eae154 commit fac6784
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion config/settings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,16 @@
# Sessions are used to anonymously keep track of individual site visitors
SESSION_ENGINE = 'django.contrib.sessions.backends.cached_db'

# TODO: replace this cache backend with a distributed solution like Memcached or Redis.
# TODO: replace these cache backends with a persistent solution like Memcached or Redis.
# For now, use the default local memory cache.
CACHES = {
"default": {
"BACKEND": "django.core.cache.backends.locmem.LocMemCache",
},
# The "renditions" cache is for Wagtail image renditions.
# Ref: https://docs.wagtail.org/en/v2.10.2/advanced_topics/performance.html#caching-image-renditions
"renditions": {
"BACKEND": "django.core.cache.backends.locmem.LocMemCache",
}
}

Expand Down

0 comments on commit fac6784

Please sign in to comment.