Hacker News new | past | comments | ask | show | jobs | submit login

How do you set an item's TTL? How do you set the maximum size of the process's cache?



> How do you set an item's TTL?

Values stored are immutable, and expire when they are no longer used. There is no concept of a TTL.

> How do you set the maximum size of the process's cache?

The cache is broken into a set of named groups, each with their own separate cache and cache-filling method. The size of each group's cache is set when created via NewGroup[1].

--

[1] http://godoc.org/github.com/golang/groupcache#NewGroup




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: