GetOrSet doesn't return cache miss message
i wanna using GetOrSet to set a empty []byte("") for protoMessage when cache miss but i have no idea how to determine cache miss, []byte("") will also make [value == nil] true
You can set a single byte value like []byte{0} instead of empty []byte{}.
You can set a single byte value like []byte{0} instead of empty []byte{}.
i haved also think about it,but proto.Unmarshal([]byte{0}) will get some error:invalid field number
You can set a single byte value like []byte{0} instead of empty []byte{}.
i haved also think about it,but proto.Unmarshal([]byte{0}) will get some error:invalid field number
Then check the length before calling Unmarshal.