Skip to content
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

Django sitewide cache and axes middleware ordering problem #1015

Open
sertac opened this issue Mar 7, 2023 · 1 comment
Open

Django sitewide cache and axes middleware ordering problem #1015

sertac opened this issue Mar 7, 2023 · 1 comment

Comments

@sertac
Copy link

sertac commented Mar 7, 2023

hi,

according to Django docs
https://docs.djangoproject.com/en/4.1/topics/cache/#the-per-site-cache
No, that’s not a typo: the “update” middleware must be first in the list, and the “fetch” middleware must be last. The details are a bit obscure, but see Order of MIDDLEWARE below if you’d like the full story.

according to axes docs
# AxesMiddleware should be the last middleware in the MIDDLEWARE list.
# It only formats user lockout messages and renders Axes lockout responses
# on failed user authentication attempts from login views.
# If you do not want Axes to override the authentication response
# you can skip installing the middleware and use your own views.
'axes.middleware.AxesMiddleware',
]

so site wide cache and axes can not work at the same time :(

any possible workaround for this problem

thanks

@aleksihakli
Copy link
Member

Would anyone have the opportunity to check the caching behavior with the site-wide cache and Axes cache enabled at the same time?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants