mirror of
https://github.com/penpot/penpot.git
synced 2026-04-25 11:18:36 +00:00
🐛 Fix ObjectsMap CLJS negative cache keyed on 'key' fn instead of 'k'
In the CLJS -lookup implementation, when a key is absent from data the negative cache entry was stored under 'key' (the built-in map-entry key function) rather than the 'k' parameter. As a result every subsequent lookup of any missing key bypassed the cache and repeated the full lookup path, making the negative-cache optimization entirely ineffective. Signed-off-by: Andrey Antukh <niwi@niwi.nz>
This commit is contained in:
parent
2b67e114b6
commit
6da39bc9c7
@ -278,7 +278,7 @@
|
||||
(set! (.-cache this) (c/-assoc cache k v))
|
||||
v)
|
||||
(do
|
||||
(set! (.-cache this) (assoc cache key nil))
|
||||
(set! (.-cache this) (assoc cache k nil))
|
||||
nil))))
|
||||
|
||||
(-lookup [this k not-found]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user