@mihaelkonjevic When i do this, am i correct in assuming that on each app-db change, there are two blackboard reactions working? what i'm trying to do here is to have the blackboard computation (quick in this example, but might be heavier) only being performed once
you mentioned caching earlier, but is this a sub only thing ?
AFAIK it should use same reaction, that's on the reagent core
ok thanks
My understanding comes from https://github.com/Day8/re-frame/blob/master/docs/SubscriptionFlow.md
i'll read this again (has been years) ... mhh i have a time value in this database i can log it in the reaction and see the result
thanks !
nope runs twice ='(
in that page you linked, they use def'ed vars so there is only one instance of each reaction, gonna have to make some cache to make it work the way i want
or some registry
the sad thing is that it's going to be duplicating part of your work on subs
that does the trick ! I can't see a production app restarting the keechma app so many times that the memory loss gets in the way
might be trouble for parametrized reactions though ...
Hm, reactions are cached on the keechma level but using them directly is out of keechma's scope. I wonder if there's a simple way to optimize it
i've been looking for an lru cache memoize, but that's only available clojure side
not such a big deal, i can cache the result of heavy computation by sticking the result in the app-db
and my dependent subscriptions would then check on that
bit messy, but gets the job done