You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to check if a key exists in the cache. Since there is not a CacheInterface.Exists, I have to rely on CacheInterface.Get to perform the check. The Redis implementation correctly returns *store.NotFound when the key is not found, but the BigCache one does not.
This seems like a trivial fix, just need to handle bigcache.ErrEntryNotFound in Get method. However, many existing library usages may be dependent on current behavior which returns error directly. So fixing this may cause issues for some users.
This seems like a trivial fix, just need to handle bigcache.ErrEntryNotFound in Get method. However, many existing library usages may be dependent on current behavior which returns error directly. So fixing this may cause issues for some users.
The two errors could be joined so that errors.Is would be true for both.
I'm thinking in the current situation, this also breaks loadable cache
I'm trying to check if a key exists in the cache. Since there is not a CacheInterface.Exists, I have to rely on CacheInterface.Get to perform the check. The Redis implementation correctly returns *store.NotFound when the key is not found, but the BigCache one does not.
Steps for Reproduction
Expected behavior:
Returned error is of type *store.NotFound
Actual behavior:
Returned error is of not of type *store.NotFound
Platforms:
macOS and dockerized Linux from scratch
Versions:
gocache v4.1.3 and v4.1.4
go 1.21
BigCache store v4.1.2 and v4.2.0
BigCache v3.1.0
Redis store v4.2.0
Redis client v9.0.5
Redis server 7.0.12
The text was updated successfully, but these errors were encountered: