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.