python - flask cache: list keys based on a pattern? -
i'm using flask cache plugin redis backend cache api response. have apis users , create user this:
/api/users?page=1 /api/users post the result cached full url key. when new user created, i'd delete keys start /api/users - i'm doing cache.clear() hardly seems necessary.
however, can't seem find api list of keys. redis-py, there keys(*pattern) api purpose. there similar api flask cache?
flask cache plugin not provide access point raw redis commands. can use redis-py connect same redis instance , database delete keys pattern.
Comments
Post a Comment