You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use locMemCache to cache some views with Django. When I cache the whole site with the following settings for middleware, everything works as expected, I have both html minification and caching working properly:
However, when I try to cache only some specific views, I delete both UpdateCacheMiddleware and FetchFromCacheMiddleware, and use instead the following in urls.py (as per django documentation about cache framework):
Then, if I do not use htmlmin (HTML_MINIFY = False), caching is working fine. But if I activate htmlmin, caching is not working anymore. I tried to move htmlmin.middleware.HtmlMinifyMiddleware and htmlmin.middleware.MarkRequestMiddleware at different locations in the MIDDLEWARE setting, beginning, end, but without any effect. I also tried to use only one of the two htmlmin middlewares, but then there is no minification.
What am I missing here? Is it possible to use htmlmin with per-view caching?
The text was updated successfully, but these errors were encountered:
I am trying to use locMemCache to cache some views with Django. When I cache the whole site with the following settings for middleware, everything works as expected, I have both html minification and caching working properly:
However, when I try to cache only some specific views, I delete both UpdateCacheMiddleware and FetchFromCacheMiddleware, and use instead the following in urls.py (as per django documentation about cache framework):
Then, if I do not use htmlmin (HTML_MINIFY = False), caching is working fine. But if I activate htmlmin, caching is not working anymore. I tried to move htmlmin.middleware.HtmlMinifyMiddleware and htmlmin.middleware.MarkRequestMiddleware at different locations in the MIDDLEWARE setting, beginning, end, but without any effect. I also tried to use only one of the two htmlmin middlewares, but then there is no minification.
What am I missing here? Is it possible to use htmlmin with per-view caching?
The text was updated successfully, but these errors were encountered: