Fork me on GitHub
#fulcro
<
2022-03-18
>
danieroux09:03:37

Where can we plug in some sort of caching strategy? Some attributes update every 10 minutes on the server side. So we need to df/load! , but not all the time.

Jakub Holý (HolyJak)10:03:09

For the whole app? For a particular report? What behavior exactly do you want? 1. You could start a core.async go-loop or just JS setInterval to call df/load! every 10 min 2. Or if the point is not to call df/load unnecessarily then you could modify the report's state machine and use your own df/load! impl that just returns the existing data if not expired yet or something...

Jakub Holý (HolyJak)10:03:22

Tip: my demo https://www.youtube.com/watch?v=rzK0_k5lzg4 presents a really useful technique for analyzing why expected data that you see in the client DB do not pop up in the UI at the expected place. It might be a little slow-paced but it is just 4 minutes. IMO time well invested. At least save the link and revisit it when you run into the problem of missing data 🙂 (https://blog.jakubholy.net/2020/troubleshooting-fulcro/ includes this and other tips)

👏 1
👍 4