The State of Caching in Go
blog.dgraph.io
blog.dgraph.io
But the headline made me think this was going to be about a glaring gap in the Go ecosystem but I can’t tell if that’s true from what they wrote. Only one library was mentioned as a theoretical solution. Are there others?
at some* point, if you're designing something like a database you should just accept that you'll be building some amount of core infrastructure (for example a cache) yourself. it seems strange to assume there is a widget in the exact shape you need with exactly the right interface and semantics floating around somewhere.
to go a step further...efficient memory management is pretty key to cache behavior. you're generally using up a good fraction of available memory and have a really good idea what the lifetimes are (since thats your whole policy). that the GC might be a little slower to release than you might like shouldnt be a surprise at all.
'how we built a cache in go' is more apt than 'why didn't go have a cache that fit our needs already, bad go'
He found one for Java.
I feel like there's an underlying phenomenon here, many people like to talk about performance but don't actually need it.
So any time you do need performance you need to sort through the popular "high performance" implementations and figure out which ones actually perform well in production.