We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Description Hi,
Thank you for making the awesome library first.
The type casting code is wrong for bigcache with string type. Because bigcache always returns []byte type(refer here) even though we can store data as string type.
[]byte
I think it is better if type casting is failed, it should return not only zero value but also error.
Steps for Reproduction
func fn(config Config) { bigcacheClient, _ := bigcache.NewBigCache(bigcache.DefaultConfig(config.ExpiredTime)) bigcacheStore := store.NewBigcache(bigcacheClient) memoryCache = cache.New[string](bigcacheStore) }
val := "some string data" memoryCache.Set(ctx, key, val) // There is no error because it will be convert to byte array
val, _ := memoryCache.Get(ctx, key) // There is no error but data is blank string.
Expected behavior: It should be return stored string data.
Actual behavior: It returned blank string.
Platforms: Ubuntu
Versions: v3.1.1
The text was updated successfully, but these errors were encountered:
same issue
Sorry, something went wrong.
No branches or pull requests
Description
Hi,
Thank you for making the awesome library first.
The type casting code is wrong for bigcache with string type. Because bigcache always returns
[]byte
type(refer here) even though we can store data as string type.I think it is better if type casting is failed, it should return not only zero value but also error.
Steps for Reproduction
Expected behavior:
It should be return stored string data.
Actual behavior:
It returned blank string.
Platforms:
Ubuntu
Versions:
v3.1.1
The text was updated successfully, but these errors were encountered: