Home > @firebase/firestore > / > getDocsFromCache
getDocsFromCache() function
Executes the query and returns the results as a QuerySnapshot
from cache. Returns an error if the document is not currently cached.
Signature:
export declare function getDocsFromCache<T>(query: Query<T>): Promise<QuerySnapshot<T>>;
Parameters
Parameter | Type | Description |
---|---|---|
query | Query<T> |
Returns:
Promise<QuerySnapshot<T>>
A Promise that will be resolved with the results of the query.