Use both key_prefix and query_string to form the cache key
Version referred - 1.10.1
Description
In current implementation cached function under the Cache class considers either query_string parameter or key_prefix parameter to build the cache key
It can be enhanced and made to consider both options together to build the cache key.
Explanation
If the cache key needs to be built like,
Expectation -
Expected format - flask_cache_<key_prefix>/<request_url><query_string_hash>
Example - flask_cache_user_managemen//api/v1/users52440c19267b11c4bbe10e97c6e45885
Current possibilities -
Format 1 - flask_cache_<key_prefix>/<request_url>
Example - flask_cache_user_management//api/v1/users
Format 1 - flask_cache_<request_url><query_string_hash>
Example - flask_cache_/api/v1/users52440c19267b11c4bbe10e97c6e45885
Agreed! Not just a feature request but arguably a bug fix, or at least prevention. There's currently no indication that query_string silently overrides key_prefix and ignores it, which is an unpleasant surprise.
(Thank you for maintaining flask-caching @northernSage et al, it's great!)