flask-caching icon indicating copy to clipboard operation
flask-caching copied to clipboard

RedisCache support for callable key prefixes was removed as of 1.11.0

Open jfrag1 opened this issue 2 years ago • 1 comments

In version 1.10.1, RedisCache supported a callable key prefix being passed, thanks to the following _get_prefix function:

def _get_prefix(self):
    return (
        self.key_prefix if isinstance(self.key_prefix, str) else self.key_prefix()
    )

However in 1.11.0, https://github.com/pallets-eco/flask-caching/pull/308 replaced usages of this function with implementations from cachelib, which does not have such a function for supporting a callable key prefix.

Environment:

  • Python version: N/A
  • Flask-Caching version: >=1.11.0

jfrag1 avatar Sep 08 '23 23:09 jfrag1

Hello, See pallets-eco/cachelib#332 for a resolution.

dbascoules avatar Feb 11 '24 10:02 dbascoules