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've faced with an issue that fastcache doesn't store value with length of exactly 512k
func main() {
cache := fastcache.New(1024)
var key, val []byte
key = []byte("k")
val = make([]byte, 512000)
cache.SetBig(key, val)
val = cache.GetBig(nil, key)
if val == nil {
fmt.Println("Value is missing")
} else {
fmt.Println("Value is OK")
fmt.Println(len(val))
}
}
The code prints "Value is missing", but if I create val as make([]byte, 512000+1) then I can set and get value.
The text was updated successfully, but these errors were encountered:
I've faced with an issue that fastcache doesn't store value with length of exactly 512k
The code prints "Value is missing", but if I create val as make([]byte, 512000+1) then I can set and get value.
The text was updated successfully, but these errors were encountered: