patrickmn / go-cache

An in-memory key:value store/cache (similar to Memcached) library for Go, suitable for single-machine applications.
https://patrickmn.com/projects/go-cache/
MIT License
8.16k stars 874 forks source link

CacheGetManyConcurrent tests has incorrect key #111

Closed Gobd closed 5 years ago

Gobd commented 5 years ago

I think these two lines should be k := "foo" + strconv.Itoa(i) (i instead of n) so that each key is different. This will make the sharded cache look better since keys will be able to spread out.

patrickmn commented 5 years ago

Yep, you're right. What a weird mistake -- thanks for noticing it. Will fix shortly.