coderedcorp / wagtail-cache

A simple page cache for Wagtail based on the Django cache middleware.
Other
87 stars 29 forks source link

does wagtail-cache cache Django views? #79

Closed davidu1975 closed 1 month ago

davidu1975 commented 1 month ago

does wagtail-cache cache Django views? As we are seeing Django form views being cached in the Wagtail admin/settings/cache page and was not expecting this?

vsalvino commented 1 month ago

The middleware potentially caches ALL requests/responses of the site. You can set it up to only cache specific views, or ignore specific views. We have detailed documentation on how this works, and how it can be configured: https://docs.coderedcorp.com/wagtail-cache/getting_started/cache_control.html

davidu1975 commented 1 month ago

thanks does it cache formviews with csrf tokens and if so how can all formviews be excluded from caching thanks

vsalvino commented 1 month ago

It handles CSRF tokens properly. Please read the documentation which answers your question in detail.