Django project with templates Internet Service Provider caching?

22 Views Asked by At

On a Django project using templates, I had the issue (rarely) that a user believed he was logged in as another user. He saw data from another user under /my-user-info where a template with data specific to the logged in request.user was served. I have checked everything around login and couldn't find a bug in the code that might cause this.

Is it possible that somewhere along the way (in the realm of the Internet Service Provider?) /my-user-info is being cached for User B and then it's shown to User A? (The app is running on EC2 without CloudFront, so I don't think there's caching at the AWS level.)

If this is not possible, do you have any ideas what might cause such a bug? Is it going to be something around logging in the wrong user by accident sometimes (so bug in the code)?

It's hard for me to believe that Internet Service Provider caching is the reason, because that would seem to me like a crazy weakness of the Internet? Should I exclude this explanation and look for bugs in the code or is this possible?

0

There are 0 best solutions below