Please share your groupcache use cases

93 views
Skip to first unread message

nvcnvn

unread,
Sep 14, 2020, 10:20:04 PM9/14/20
to golang-nuts
If I understand correctly, because groupcache doesn't allow modify value (except it deleted by LRU???), I need to add time bucket to the key?

```
func timeBucket(t time.Time) string {
    return t.Format("2006_01_02_15_04")
}

func userCacheKey(id string, t time.Time) string {
   return id + timeBucket(t)
}
```

Do I understand thing correctly?
Reply all
Reply to author
Forward
0 new messages