forked from mystiq/hydrogen-web
Don't cache GET requests
This commit is contained in:
parent
bb6a885116
commit
5e93e048ab
1 changed files with 2 additions and 2 deletions
|
@ -77,7 +77,7 @@ export class HomeServerApi {
|
|||
timeout: options?.timeout,
|
||||
uploadProgress: options?.uploadProgress,
|
||||
format: "json", // response format
|
||||
cache: options?.cache ?? false
|
||||
cache: method !== "GET",
|
||||
});
|
||||
|
||||
const hsRequest = new HomeServerRequest(method, url, requestResult, options);
|
||||
|
@ -160,7 +160,7 @@ export class HomeServerApi {
|
|||
// todo: This is so that we disable cache-buster because it would cause the hs to respond with error
|
||||
// see https://github.com/matrix-org/synapse/issues/7722
|
||||
const _options = options ?? {};
|
||||
Object.assign(_options, { cache: true, allowedErrors: [401] });
|
||||
Object.assign(_options, { allowedErrors: [401] });
|
||||
const body = {
|
||||
auth,
|
||||
password,
|
||||
|
|
Loading…
Reference in a new issue