0

currently developing an app using firestore as my database.

The way it works is, I have created 3 users, and each user has 300 products associated to him. The problem is that everytime the user navigates to the page, it calls 300x at the time, so I'm hitting the free 50k easily. Since I need real time on some pages what is the best approach ?

Thanks

Miguel
  • 25
  • 7
  • 1
    Restructure your data so that it's one request. Or, learn to accept longer cache times. – Randal Schwartz Apr 16 '23 at 00:21
  • As Randal said, you can combine the information you need into fewer documents - possibly even just one. Alternatively you can enable caching (it's disabled by default for the web) and explicitly manage the cache. I linked a few questions that cover these options. – Frank van Puffelen Apr 16 '23 at 00:42
  • I think that this [resource](https://medium.com/firebase-tips-tricks/how-to-filter-firestore-data-cheaper-705f5efec444) will help. – Alex Mamo Apr 17 '23 at 08:23

0 Answers0