Fork me on GitHub
#re-frame
<
2021-11-15
>
Fahd El Mazouni11:11:00

Hi ! Do you have experience with handling data offloading (cache management) on the app db ? It would be nice if we could have some logic to handle this and keep app-db size reasonable, any tips would be appreciated

emccue19:11:07

Can you describe more of what you what?

Fahd El Mazouni09:11:49

@U3JH98J4R basically make sure I don't keep too much data on the app db, users would spend a lot of time on a single session, a lot of data would be fetched and kept around, it's not a problem in most cases but it can end up slowing down the app (the app is running on electron)

emccue14:11:23

Index your data first off. That should buy you a bunch of time, but after that you need to know when you can take data out of the app db and put it in storage and what data you can and thats gonna be app specific

Fahd El Mazouni14:11:50

do you mean indexing data as you would in a database ? the data is stored in the app db in nested maps with ids as keys so I don't see how I could make it faster

Quentin Le Guennec17:11:12

indexed-db would probably make it faster, I'm not sure

Drew Verlee22:11:09

Is it possible to dispatch direction to a reg-fx? e.g what's the best way to handle when you need to something on-click but the db doesn't need to be updated? The obvious answer is i just call the side effect and dont worry about a reg-fx