Site icon Tutorial

Order of MIDDLEWARE_CLASSES

If you use CacheMiddleware, it’s important to put it in the right place within the MIDDLEWARE_CLASSES setting, because the cache middleware needs to know the headers by which to vary the cache storage. Put the CacheMiddleware after any middlewares that might add something to the Vary header, including the following:

Back to Tutorial

Exit mobile version