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

GetSkippingLocalCache does not update the value in the cache #53

Closed btrvodka closed 3 years ago

btrvodka commented 3 years ago

https://github.com/go-redis/cache/blob/1cdfea0b552bc815ba7a2767f23a56da0ce27146/cache.go#L217

GetSkippingLocalCache reads values from Redis but does not update them in the cache. is it a bug or a feature?

fix: -if !skipLocalCache && cd.opt.LocalCache != nil { +if cd.opt.LocalCache != nil {