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 kiranparajuli589 committed Mar 2, 2022
1 parent db72a9b commit 7bb3133
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
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 @@ -69,7 +69,8 @@ export function useAppFileHandling(options: AppFileHandlingOptions): AppFileHand
}
} else {
return client.files.getFileContents(filePath, {
resolveWithResponseObject: true
resolveWithResponseObject: true,
noCache: true
})
}
}
Expand Down

0 comments on commit 7bb3133

Please sign in to comment.