Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@JisanAR03
Copy link
Contributor

the change will fix the cache error from home page and also fix the run-test error too

@sentry
Copy link

sentry bot commented Jul 2, 2024

🔍 Existing Issues For Review

Your pull request is modifying functions with the following pre-existing issues:

📄 File: website/views.py

Function Unhandled Issue
_cache_middleware AttributeError: 'AnonymousUser' object has no attribute 'email' ...
Event Count: 3

Did you find this useful? React with a 👍 or 👎

@JisanAR03
Copy link
Contributor Author

@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

Copy link
Collaborator

@DonnieBLT DonnieBLT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome thank you!

@DonnieBLT DonnieBLT merged commit aaf6384 into OWASP-BLT:main Jul 2, 2024
@JisanAR03 JisanAR03 mentioned this pull request Jul 2, 2024

@receiver(user_logged_out)
def handle_user_logged_out(request, user, **kwargs):
cache.clear()
Copy link

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?

Copy link
Contributor Author

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?

Copy link

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?

Copy link
Contributor Author

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

@JisanAR03 JisanAR03 deleted the fix_clear_cache branch July 9, 2024 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants