Closed pscott-au closed 7 years ago
Hi @pscott-au, right now Afo will store all data from all references used.
Here are some ways to manage that:
reset
method on the reference.Do these options work well for your use case?
Thanks @adriancarriger
Would I be correct to assume that if I wish to flush the local storage of a tree that I can call a reset from a subsequently subscribed parent in the tree or do I need to specifically reset the specific record set.
eg.
If I have an application that loads invoices into an Afo property that is in the FB hierarchy /invoices/$uid/$invoice_id would instantiating an Afo object of /invoices/$uid and calling a reset
flush out all of the children stored locally?
Hi @pscott-au, that's a great question!
reset
on each reference used in your app (which might require data denormalization)reset
with no reference argument will remove all local data from the entire appIf either of these options don't work well for your use case, then feel free to request an enhancement. Thanks! 👍
For me I find that doing a reset without params on logout seems to do the trick. Cheers.
Awesome!
I am wondering how to manage the storage usage. I am using in an ionic mobile app ( iOS ) and am concerned that if I am accessing a lot of data that I should be managing or at least keeping an eye on the resource usage. Could we add a couple of lines into the docs to describe how this could be done and any advice on how this works,