cashews icon indicating copy to clipboard operation
cashews copied to clipboard

cache.invalidate(key) doesn't remove corresponded etag records

Open seekerk opened this issue 1 year ago • 1 comments

When I add CacheEtagMiddleware middleware into fastapi project cashews creates two records in redis database on GET request: one with key and one with etag. When I try to invalidate cache on POST request by using cache.invalidate(key) the cashews removes only one record. The record with fastapi::etag:... continues to be stored in redis and next GET request returns invalide (old) data.

seekerk avatar Oct 09 '24 09:10 seekerk

@seekerk thanks for reporting this issue. Sure it's a bug.

Krukov avatar Oct 10 '24 20:10 Krukov