I encountered a problem using @cache_page(60 * 15)
of Django in my case. The first user to give the first F5, the page will get stuck with the DELE user logged in. So even if I enter another user, the page will have the account of the other user trapped in the cache. This is bad.
I tried to use that cache in the template, but the performance problem comes from VIEW so it does not scroll.
The question is: my filter is very heavy and I have already made several adjustments to decrease. It gets to do an average of 180ms to 200ms in DEV and in production goes there for 300-400ms. This is a grotesque delay in my case.
When I used the Django cache for the URL or this cache_page was 8ms, it was beautiful. But nothing is perfect. I would like to know if anyone has any alternatives or how to work with these cases.
This is my setting in settings.py
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
'LOCATION': 'unique-snowflake',
}
}