Skip to content

Simplified cache usage in accounts view helper #2089

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

Merged

Conversation

adamzap
Copy link
Member

@adamzap adamzap commented Jun 3, 2025

Importing cache instead of caches uses the default cache: https://docs.djangoproject.com/en/5.2/topics/cache/#django.core.cache.cache

Let me know if the test could be improved. I noticed that the caching behavior wasn't covered.

Importing `cache` instead of `caches` uses the default cache.
Copy link
Member

@pauloxnet pauloxnet left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@CuriousLearner CuriousLearner left a comment

Choose a reason for hiding this comment

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

LGTM 🌮

@sabderemane sabderemane merged commit 3b359fc into django:main Jun 12, 2025
4 checks passed
@adamzap adamzap deleted the simplify-cache-use-in-accounts-views branch June 12, 2025 14:28
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.

4 participants