2. Caching

2.1. Setup

To setup caching configure a caching backend in django.

Details for caching can be found here: https://docs.djangoproject.com/en/dev/topics/cache/

In your middleware settings be sure to add django.middleware.cache.UpdateCacheMiddleware at the first and django.middleware.cache.FetchFromCacheMiddleware at the last position:


2.1.1. Plugins

New in version 3.0.

Normally all plugins will be cached. If you have a plugin that is dynamic based on the current user or other dynamic properties of the request set the cache=False attribute on the plugin class:

class MyPlugin(CMSPluginBase):
    name = _("MyPlugin")
    cache = False


If you disable a plugin cache be sure to restart the server and clear the cache afterwards.

2.1.2. Content Cache Duration

Default: 60

This can be changed in CMS_CACHE_DURATIONS

2.1.3. Settings

Caching is set default to true. Have a look at the following settings to enable/disable various caching behaviors: