Open vladox opened 2 years ago
How do you avoid caching in the Wagtail API? The issue is with an APIView, but I couldn't find a way for the middleware to ignore the API Calls.
Good question. For the pickling error, what version of Wagtail and Django are you using?
As far as not caching the API, you'll need to disable the middleware, and either:
cache_page
decorator.See this section in the docs: https://docs.coderedcorp.com/wagtail-cache/getting_started/install.html#only-cache-specific-views
Let me know if either of those approaches helps.
Hint while debugging: the HTTP Response contains an X-Wagtail-Cache
header which indicates: skip, miss, or hit. If it is not present in the response then the URL is not even being touched by wagtail-cache.
We are getting the following error, is it a known issue?
_pickle.PicklingError: Can't pickle <class 'wagtail.core.blocks.base.SampleStreamBlockMeta'>: attribute lookup SampleStreamBlockMeta on wagtail.core.blocks.base failed