go-redis / cache

Cache library with Redis backend for Golang
https://redis.uptrace.dev/guide/go-redis-cache.html
BSD 2-Clause "Simplified" License
757 stars 95 forks source link

Replace go4.org/syncutil/singleflight with golang.org/x/sync/singleflight #36

Closed idealism-xxm closed 4 years ago

idealism-xxm commented 4 years ago
  1. go4.org is too large and only singleflight is used, so I replace go4.org/syncutil/singleflight with golang.org/x/sync/singleflight which is better.

  2. To avoid panics when marshal/unmarshal object without msgpack tag, call UseJSONTag(true) from Encoder/Decoder before calling Marshal/Unmarshal.

vmihailenco commented 4 years ago

Looks good - thanks!