-
Notifications
You must be signed in to change notification settings - Fork 273
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
Custom cache page #2311
Custom cache page #2311
Conversation
b7869ce
to
5cffb2c
Compare
d96c7f9
to
6199cbc
Compare
query_params = request.request.GET.dict() | ||
cache_path = f"{urlencode(query_params)}" | ||
# Calculate cache_name | ||
address = request.kwargs["address"] |
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.
Maybe "address"
should be an optional parameter to the decorator, so we can use different keys in the future
Also this can throw an exception if address
does not exist. It should be: request.kwargs.get("address")
so you can emit a warning when you evaluate if address:
later
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.
My idea here is to start by the cases where a Safe is a part of the URL path.
Later if we are happy with the results we can move forward to other endpoints. What do you think?
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.
Either way, making address
as a url path value configurable is just adding an optional parameter (by default 'address'
) to the decorator, something like caching_value_name
Co-authored-by: Uxío <[email protected]>
Closes #2008