-
-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BigCache implementation does not return an error of type *store.NotFound when the key is not found #224
Comments
This seems like a trivial fix, just need to handle |
The two errors could be joined so that errors.Is would be true for both. |
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: