re-posh
re-posh copied to clipboard
another caching bug
;; this is bugged. apparently results are cached.
#_(rp/reg-query-sub
::entity-id-by-attribute-value
'[:find ?e . :in $ ?a ?v :where [?e ?a ?v]])
(rf/reg-sub
::entity-id-by-attribute-value
(fn [_ [_ attr val]]
(d/q '[:find ?e . :in $ ?a ?v :where [?e ?a ?v]] @connection attr val)))
First one does not return a different value if entities are retracted and re-added. Latter one does.
May be related to: #41
Hello @jleonard-r7 . Thank you for reporting this issue, I would really love to fix it, but just don't have enough time for that so far. If you like to figure out it by yourselves, there are some suggestions. re-posh
is a simple adapter, which connects posh and re-frame
framework. I think it's really unlikely that this caching bugs belong to re-posh
and most likely they are somewhere inside posh
. The author of posh
is not maintained it anymore, so I decided to do it myself, but as I said recently didn't have much time.
I suggest you trying to reproduce these caching bug using just a pure posh (the changes should be minimal actually) and then dig into this library