@fluidframework/routerlicious-driver 2.0.0-internal.1.2.0.93071 → 2.0.0-internal.1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/documentDeltaConnection.d.ts.map +1 -1
- package/dist/documentDeltaConnection.js +3 -6
- package/dist/documentDeltaConnection.js.map +1 -1
- package/dist/documentServiceFactory.d.ts.map +1 -1
- package/dist/documentServiceFactory.js +3 -6
- package/dist/documentServiceFactory.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.d.ts.map +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/shreddedSummaryDocumentStorageService.d.ts +1 -0
- package/dist/shreddedSummaryDocumentStorageService.d.ts.map +1 -1
- package/dist/shreddedSummaryDocumentStorageService.js +7 -4
- package/dist/shreddedSummaryDocumentStorageService.js.map +1 -1
- package/dist/urlUtils.d.ts.map +1 -1
- package/dist/urlUtils.js +0 -1
- package/dist/urlUtils.js.map +1 -1
- package/dist/wholeSummaryDocumentStorageService.d.ts +1 -0
- package/dist/wholeSummaryDocumentStorageService.d.ts.map +1 -1
- package/dist/wholeSummaryDocumentStorageService.js +10 -6
- package/dist/wholeSummaryDocumentStorageService.js.map +1 -1
- package/lib/documentDeltaConnection.d.ts.map +1 -1
- package/lib/documentDeltaConnection.js +3 -6
- package/lib/documentDeltaConnection.js.map +1 -1
- package/lib/documentServiceFactory.d.ts.map +1 -1
- package/lib/documentServiceFactory.js +3 -6
- package/lib/documentServiceFactory.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.d.ts.map +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/shreddedSummaryDocumentStorageService.d.ts +1 -0
- package/lib/shreddedSummaryDocumentStorageService.d.ts.map +1 -1
- package/lib/shreddedSummaryDocumentStorageService.js +7 -4
- package/lib/shreddedSummaryDocumentStorageService.js.map +1 -1
- package/lib/urlUtils.d.ts.map +1 -1
- package/lib/urlUtils.js +0 -1
- package/lib/urlUtils.js.map +1 -1
- package/lib/wholeSummaryDocumentStorageService.d.ts +1 -0
- package/lib/wholeSummaryDocumentStorageService.d.ts.map +1 -1
- package/lib/wholeSummaryDocumentStorageService.js +10 -6
- package/lib/wholeSummaryDocumentStorageService.js.map +1 -1
- package/package.json +10 -10
- package/src/documentDeltaConnection.ts +3 -5
- package/src/documentServiceFactory.ts +3 -5
- package/src/packageVersion.ts +1 -1
- package/src/shreddedSummaryDocumentStorageService.ts +11 -4
- package/src/urlUtils.ts +0 -1
- package/src/wholeSummaryDocumentStorageService.ts +11 -6
|
@@ -120,7 +120,7 @@ export class WholeSummaryDocumentStorageService implements IDocumentStorageServi
|
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
public async readBlob(blobId: string): Promise<ArrayBufferLike> {
|
|
123
|
-
const cachedBlob = await this.blobCache.get(blobId);
|
|
123
|
+
const cachedBlob = await this.blobCache.get(this.getCacheKey(blobId));
|
|
124
124
|
if (cachedBlob !== undefined) {
|
|
125
125
|
return cachedBlob;
|
|
126
126
|
}
|
|
@@ -142,7 +142,7 @@ export class WholeSummaryDocumentStorageService implements IDocumentStorageServi
|
|
|
142
142
|
);
|
|
143
143
|
const bufferValue = stringToBuffer(blob.content, blob.encoding);
|
|
144
144
|
|
|
145
|
-
await this.blobCache.put(blob.sha, bufferValue);
|
|
145
|
+
await this.blobCache.put(this.getCacheKey(blob.sha), bufferValue);
|
|
146
146
|
|
|
147
147
|
return bufferValue;
|
|
148
148
|
}
|
|
@@ -208,7 +208,7 @@ export class WholeSummaryDocumentStorageService implements IDocumentStorageServi
|
|
|
208
208
|
}
|
|
209
209
|
|
|
210
210
|
private async fetchAndCacheSnapshotTree(versionId: string, disableCache?: boolean): Promise<ISnapshotTreeVersion> {
|
|
211
|
-
const cachedSnapshotTreeVersion = await this.snapshotTreeCache.get(versionId);
|
|
211
|
+
const cachedSnapshotTreeVersion = await this.snapshotTreeCache.get(this.getCacheKey(versionId));
|
|
212
212
|
if (cachedSnapshotTreeVersion !== undefined) {
|
|
213
213
|
return { id: cachedSnapshotTreeVersion.id, snapshotTree: cachedSnapshotTreeVersion.snapshotTree };
|
|
214
214
|
}
|
|
@@ -236,7 +236,7 @@ export class WholeSummaryDocumentStorageService implements IDocumentStorageServi
|
|
|
236
236
|
|
|
237
237
|
const cachePs: Promise<any>[] = [
|
|
238
238
|
this.snapshotTreeCache.put(
|
|
239
|
-
snapshotTreeId,
|
|
239
|
+
this.getCacheKey(snapshotTreeId),
|
|
240
240
|
snapshotTreeVersion,
|
|
241
241
|
),
|
|
242
242
|
this.initBlobCache(normalizedWholeSummary.blobs),
|
|
@@ -247,7 +247,7 @@ export class WholeSummaryDocumentStorageService implements IDocumentStorageServi
|
|
|
247
247
|
// However, for something like Redis, this will cache the same value twice. Alternatively, could we simply
|
|
248
248
|
// cache with versionId?
|
|
249
249
|
cachePs.push(this.snapshotTreeCache.put(
|
|
250
|
-
versionId,
|
|
250
|
+
this.getCacheKey(versionId),
|
|
251
251
|
snapshotTreeVersion,
|
|
252
252
|
));
|
|
253
253
|
}
|
|
@@ -260,8 +260,13 @@ export class WholeSummaryDocumentStorageService implements IDocumentStorageServi
|
|
|
260
260
|
private async initBlobCache(blobs: Map<string, ArrayBuffer>): Promise<void> {
|
|
261
261
|
const blobCachePutPs: Promise<void>[] = [];
|
|
262
262
|
blobs.forEach((value, id) => {
|
|
263
|
-
|
|
263
|
+
const cacheKey = this.getCacheKey(id);
|
|
264
|
+
blobCachePutPs.push(this.blobCache.put(cacheKey, value));
|
|
264
265
|
});
|
|
265
266
|
await Promise.all(blobCachePutPs);
|
|
266
267
|
}
|
|
268
|
+
|
|
269
|
+
private getCacheKey(blobId: string): string {
|
|
270
|
+
return `${this.id}:${blobId}`;
|
|
271
|
+
}
|
|
267
272
|
}
|