问题
I am storing a collection of documents of blocked users. I am checking if the request is from a blocked user or not by checking if the email exist within the blocked collection
allow read: if exists(/databases/$(database)/documents/blocked/$(request.auth.token.email)) == false;
does checking if the document exist count as a read?
回答1:
Yes, exists()
counts as a read toward your billing. They also count against the max number of reads you can perform per request.
来源:https://stackoverflow.com/questions/55257311/cloud-firestore-rules-using-exist-does-it-count-as-a-read