This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-05-07
Channels
- # asami (1)
- # aws (2)
- # babashka (5)
- # babashka-sci-dev (162)
- # beginners (68)
- # biff (1)
- # calva (26)
- # circleci (4)
- # clj-kondo (5)
- # cljs-dev (7)
- # clojure (84)
- # clojure-europe (15)
- # clojure-uk (1)
- # clojured (2)
- # clojurescript (19)
- # conjure (1)
- # datomic (5)
- # emacs (2)
- # graalvm (20)
- # honeysql (6)
- # improve-getting-started (2)
- # kaocha (3)
- # lsp (31)
- # off-topic (7)
- # pathom (7)
- # releases (1)
- # shadow-cljs (1)
- # spacemacs (1)
- # vim (30)
Memoize can be not that great if you want to override the default http-client (see this section of the readme: https://github.com/cognitect-labs/aws-api#ops-limit-reached) 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.