I'm currently developing a Website using Firestore. The project includes different categories, where each category contains several products as documents.
As for now I'm planning when and where I want to fetch the products and their details. For me, the best approach seems to be, to fetch the respective data just as soon as the user selects the category. - Let's say I have 10 products inside of this category, as a consequence 10 documents are being fetched (as far as I know).
What I'm wondering is, how can I protect my database from spam? Let's say the user stays on the category's page and reloads 100 times - this would mean 100 * 10 documents would be fetched. Since every fetched document in the end costs money, that could lead to a tremendous bill.
How can I prevent this from happening? Is there even a way to do so or do I have to choose a totally different approach (Firebase Realtime Database?)?