Issue
I am using Django with Memcached in production and as far as I can tell, the caching system seems to work fine, however, it causes certain errors in my application:
- Whenever a form is submitted, I get a CSRF error, because for some unknown reason the CSRF token gets cached.
- My templates are also not rendering correctly, for example, when a user is logged in I have a conditional in my template that checks if the user is authenticated, but when viewing the page, the template doesn't get updated and is still showing the cached version.
If anyone knows what is going on here and how I can fix this, please let me know.
Solution
You should fragment cache template, so that you don't cache parts that should be changed with each request
Answered By - iklinac Answer Checked By - Candace Johnson (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.