Fork me on GitHub

Memoize can be not that great if you want to override the default http-client (see this section of the readme: and need to shut the client down when it's not in use. There is no good way to bust a cached value with memoize. We create our clients once and then pass them around where they are needed. No need to worry about stale clients that have been shutdown when we control it's lifecycle.

👍 1

That's a specific example of why global state sucks. I do not trust memoize for managing long lived objects. It has bitten my team pretty hard a couple times now.