@@ -25,6 +25,7 @@ import {
25
25
makeFirestoreStateTransferKey ,
26
26
constructFsUrl
27
27
} from './server.firebase.fs.common'
28
+ import { sha1 } from 'object-hash'
28
29
29
30
interface Field {
30
31
readonly [ key : string ] : any
@@ -197,9 +198,6 @@ export class ServerUniversalFirestoreService
197
198
universalCollection < T > ( path : string , queryFn ?: QueryFn ) {
198
199
const url = constructFsUrl ( extractFsHostFromLib ( this . afs ) , undefined , true )
199
200
const tsKey = makeFirestoreStateTransferKey ( url )
200
- const params = getParams ( )
201
- const cacheKey = getFullUrl ( url , params )
202
- const cachedValue = attemptToGetLruCachedValue < T > ( cacheKey , this . lru )
203
201
const ref = this . afs . firestore . collection ( path )
204
202
const query = ( queryFn && queryFn ( ref as any ) ) || ref
205
203
const limit = ( query as any ) . _query . limit
@@ -209,7 +207,8 @@ export class ServerUniversalFirestoreService
209
207
const orderBy = ( query as any ) . _query . explicitOrderBy as ReadonlyArray <
210
208
OrderBy
211
209
>
212
-
210
+ const cacheKey = sha1 ( { ...( query as any ) . _query , path } )
211
+ const cachedValue = attemptToGetLruCachedValue < T > ( cacheKey , this . lru )
213
212
const fieldFilters = filters . map ( mapFilterToFieldFilter )
214
213
const where = composeFilter ( fieldFilters )
215
214
0 commit comments