re-posh icon indicating copy to clipboard operation
re-posh copied to clipboard

another caching bug

Open jleonard-r7 opened this issue 2 years ago • 2 comments

  ;; 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.

jleonard-r7 avatar May 18 '22 20:05 jleonard-r7

May be related to: #41

jleonard-r7 avatar May 18 '22 21:05 jleonard-r7

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

denistakeda avatar May 30 '22 14:05 denistakeda