sampl / firefly

Web app boilerplate for beginners based on Firebase and React 🔥
http://getfirefly.org/
234 stars 42 forks source link

Cache Firebase data #33

Closed sampl closed 7 years ago

sampl commented 7 years ago

Currently using "once" to get items, but "on" caches the data locally and speeds everything up.

Would require a good way for views to turn db refs "off" when they unmount

sampl commented 7 years ago

Could pass a "cache?" attr when creating a new model, but it would cache the whole collection.

Is that not what we'd want? What SHOULD be cached? Only caching for the lifecycle of a component doesn't seem like it would provide much efficiency, mostly just good for real-time updates?

"There are only two hard problems in computer science..."

Closing until I can articulate the goal here better.