Ditto for source file
This commit is contained in:
parent
88f8307726
commit
c2c31db092
8
cache.go
8
cache.go
|
@ -61,10 +61,10 @@ package cache
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// // If you store a reference type like a pointer, slice, map or channel, you
|
// // If you store a reference type like a pointer, slice, map or channel, you
|
||||||
// // do not need to run Set if you modify the underlying data. The cache does
|
// // do not need to run Set if you modify the underlying data. The cached
|
||||||
// // not serialize its data, so if you modify a struct whose pointer you've
|
// // reference points to the same memory, so if you modify a struct whose
|
||||||
// // stored in the cache, retrieving that pointer with Get will point you to
|
// // pointer you've stored in the cache, retrieving that pointer with Get will
|
||||||
// // the same data:
|
// // point you to the same data:
|
||||||
// foo := &MyStruct{Num: 1}
|
// foo := &MyStruct{Num: 1}
|
||||||
// c.Set("foo", foo, 0)
|
// c.Set("foo", foo, 0)
|
||||||
// ...
|
// ...
|
||||||
|
|
Loading…
Reference in New Issue