Skip to content
Snippets Groups Projects
Unverified Commit a97bdb25 authored by Oleksandr Yakushev's avatar Oleksandr Yakushev Committed by GitHub
Browse files

perf: Use database-id instead of database object in memoizing calls to driver/supports? (#46673)

parent f83bfa66
Branches
Tags
No related merge requests found
......@@ -248,7 +248,10 @@
false))))
(def ^:private memoized-supports?*
(mdb/memoize-for-application-db supports?*))
(memoize/memo
(-> supports?*
(vary-meta assoc ::memoize/args-fn (fn [[driver feature database]]
[driver feature (mdb/unique-identifier) (:id database) (:updated_at database)])))))
(defn supports?
"A defensive wrapper around [[database-supports?]]. It adds logging, caching, and error handling to avoid crashing the app
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment