Skip to content

Commit

Permalink
Do not load files from cache (#6447)
Browse files Browse the repository at this point in the history
* Do not load files from cache

* changelog
  • Loading branch information
diocas authored and dschmidt committed Apr 26, 2022
1 parent fc9075c commit a560ef7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions changelog/unreleased/bugfix-do-not-load-from-cache
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Do not load files from cache

When apps (i.e Drawio) try to load a file, the browser caches the request.
If the file was modified somewhere else, this causes inconsistent results which prevent saving any changes until the cache is properly cleared.

https://github.com/owncloud/web/pull/6447
2 changes: 1 addition & 1 deletion packages/web-app-draw-io/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export default {
})
},
load() {
this.getFileContents(this.filePath, { resolveWithResponseObject: true })
this.getFileContents(this.filePath)
.then((resp) => {
this.currentETag = resp.headers.ETag
this.$refs.drawIoEditor.contentWindow.postMessage(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ export function useAppFileHandling(options: AppFileHandlingOptions): AppFileHand
} else {
return client.files.getFileContents(filePath, {
resolveWithResponseObject: true,
noCache: true,
...options
})
}
Expand Down

0 comments on commit a560ef7

Please sign in to comment.