You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In looking at the implementation of @cache.cached(query_string=True), I note that key_prefix is completely ignored. Is there an intentional design decision behind this that would otherwise cause issues?
For example, the simplest version of this change might be:
(Here I only provide the corresponding code path for_make_cache_key's case when use_request=True since setting query_string=True implicitly requires the request.)
Additionally, might it be useful to have a separator character between the prefix/path and the cache_hash, perhaps :? This might aid future work in invalidating cache keys for all query string variants of the same request path.
Very happy to provide a PR if either are deemed useful additions!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
In looking at the implementation of
@cache.cached(query_string=True)
, I note thatkey_prefix
is completely ignored. Is there an intentional design decision behind this that would otherwise cause issues?For example, the simplest version of this change might be:
(Here I only provide the corresponding code path for
_make_cache_key
's case whenuse_request=True
since settingquery_string=True
implicitly requires the request.)Additionally, might it be useful to have a separator character between the prefix/path and the
cache_hash
, perhaps:
? This might aid future work in invalidating cache keys for all query string variants of the same request path.Very happy to provide a PR if either are deemed useful additions!
Beta Was this translation helpful? Give feedback.
All reactions