v3.0.0
Generics.
Import github.com/karlseguin/ccache/v3
(or continue using github.com/karlseguin/ccache
for the non-generic version)
For the most part, the type of value only needs to be set when configuring the cache:
// a cache with string values
var cache = ccache.New(ccache.Configure[string]())
And then calls to item.Value()
will return a string
.