long2ice / fastapi-cache

fastapi-cache is a tool to cache fastapi response and function result, with backends support redis and memcached.
https://github.com/long2ice/fastapi-cache
Apache License 2.0
1.28k stars 157 forks source link

Feature request: granular cache invalidation #434

Open tworedz opened 1 month ago

tworedz commented 1 month ago

Hello there!

I want to propose a cache invalidation feature based on tags. It would be similar to Redux Toolkit query invalidation: https://redux-toolkit.js.org/rtk-query/usage/mutations#revalidation-example.

I am providing my initial implementation for this and would like to know if it is worth incorporating into this library.

I have already found similar issues, which I believe could be resolved as well: https://github.com/long2ice/fastapi-cache/issues/298 https://github.com/long2ice/fastapi-cache/issues/96

@long2ice can you please take a look?

tworedz commented 1 month ago

Hey, any updates here?) @long2ice @mjpieters