-
-
Notifications
You must be signed in to change notification settings - Fork 313
fix the cache error which also occurred error on run-test #2392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🔍 Existing Issues For ReviewYour pull request is modifying functions with the following pre-existing issues: 📄 File: website/views.py
Did you find this useful? React with a 👍 or 👎 |
|
@DonnieBLT , @arkid15r ,, there is a cache related issue I have notice , for that reason the home page not work perfectly . and also showing "run test" error in every PR . now It's fixed . can you please review for merge this update |
DonnieBLT
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome thank you!
|
|
||
| @receiver(user_logged_out) | ||
| def handle_user_logged_out(request, user, **kwargs): | ||
| cache.clear() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you clear the entire cache upon this event?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes sir, should i just remove the cache_key?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what issue you fixed with that but it seem an overkill to me in any case as the entire cache is being invalidated upon any user signin/signup/logout event, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah right sir , I will fix this up for sure
the change will fix the cache error from home page and also fix the run-test error too