-
Notifications
You must be signed in to change notification settings - Fork 554
Update driver cache entries to contain the file version #25337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
97e3aeb
7972883
a5f5ac5
dc402b0
72ba0bc
ae735ef
04c8817
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -114,7 +114,7 @@ export interface IPersistedCache { | |
put(entry: ICacheEntry, value: any): Promise<void>; | ||
|
||
/** | ||
* Removes the entries from the cache for given parametres. | ||
* Removes the entries from the cache for given parameters. | ||
* @param file - file entry to be deleted. | ||
*/ | ||
removeEntries(file: IFileEntry): Promise<void>; | ||
|
@@ -127,5 +127,10 @@ export interface IPersistedCache { | |
* @internal | ||
*/ | ||
export function getKeyForCacheEntry(entry: ICacheEntry): string { | ||
return `${entry.file.docId}_${entry.type}_${entry.key}`; | ||
const version = | ||
"fileVersion" in entry.file.resolvedUrl && entry.file.resolvedUrl.fileVersion !== undefined | ||
? `_${entry.file.resolvedUrl.fileVersion}` | ||
: ""; | ||
const suffix = entry.type === "snapshot" ? "" : `_${entry.key}`; | ||
jzaffiro marked this conversation as resolved.
Show resolved
Hide resolved
|
||
return `${entry.file.docId}${version}_${entry.type}${suffix}`; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will cause a regression in load performance as we are changing the key corresponding to the stored snapshot. So the previous entries won't be found and instead of loading from cache, we will load from network for each document. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh, the version will "" for snapshot key. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you before and after example of how would the key look for snapshot and ops? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, the goal is to only change the cache entries for versioned snapshots/ops and leave the entries for the main document untouched. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok got it. So, when they will start supplying the version, then they will face some regression. You can let them know before hand, when they will start the rollout. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Examples with versions: If there is a version value in entry.key for a snapshot entry, it will also be accessible from the resolved url, and will end up in the |
||
} |
Uh oh!
There was an error while loading. Please reload this page.