Skip to content

Commit

Permalink
In development, disable caching of resources so that every resource i…
Browse files Browse the repository at this point in the history
…s reloaded when the window is reloaded (#6105)
  • Loading branch information
softwarenerd authored Jan 24, 2025
1 parent dfe1f25 commit 14767e2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/vs/platform/protocol/electron-main/protocolMainService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,14 @@ export class ProtocolMainService extends Disposable implements IProtocolMainServ
}
}

// --- Start Positron ---
// In development, disable caching of resources so that every resource is reloaded when the
// window is reloaded.
if (!this.environmentService.isBuilt) {
headers = { ...headers, 'Cache-Control': 'no-store' };
}
// --- End Positron ---

// first check by validRoots
if (this.validRoots.findSubstr(path)) {
return callback({ path, headers });
Expand Down

0 comments on commit 14767e2

Please sign in to comment.