Supported Cache Backends

Built-in Django cache backends

  • Memcached (django.core.cache.backends.memcached.MemcachedCache) - untested, but should be working.

  • Database (django.core.cache.backends.db.DatabaseCache) - tested, working.

  • Filesystem (django.core.cache.backends.filebased.FileBasedCache) - tested, working.

  • Local memory (django.core.cache.backends.locmem.LocMemCache) - tested, working. But not ideal for production (see Django docs for reasons why).

Note

Wagtail Cache may or may not work correctly with 3rd party backends. If you experience an issue, please report it on our GitHub page.

django-redis

Wagtail Cache provides a compatibility backend to support django-redis. Install as follows:

  1. Install wagtail-cache following the installation guide.

  2. Install django-redis and define a Redis cache in your settings.py.

  3. Replace django_redis.cache.RedisCache with wagtailcache.compat_backends.django_redis.RedisCache in your cache definition.

Note

If you are currently using Redis or have other code that uses a Redis cache, It is advised to use separate cache definitions for wagtail-cache and your other uses.