freecache
freecache copied to clipboard
a small question
trafficstars
I already know the free cache is fast than map.
but freecache store []byte in memory, and always our's data isn't []byte, so we should marshal or convert data to []byte..
so, my question is marshal time worth using freecache?
Most of the time, marshal/unmarshal would be much more expensive than lookup. But if you have many CPU cores and access your cache concurrently, freecache may worth using.
@coocood How about use interface{}, and use type assertion instead of marshal/unmarsh?