Skip to content

Commit

Permalink
enable response caching
Browse files Browse the repository at this point in the history
  • Loading branch information
haitrr committed Aug 17, 2020
1 parent ad9a98e commit 97e9a2a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Utilities/HttpRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ function defaultResponseErrorHandler(response) {
notification.error({ message: response.json().message });
} else {
notification.error({
message: `Error connecting with server ${response.status}:${
response.statusText
}`
message: `Error connecting with server ${response.status}:${response.statusText}`
});
}
}
Expand Down Expand Up @@ -110,7 +108,7 @@ export async function getAsync(
}

return fetch(fullUrl, {
cache: "no-cache", // *default, no-cache, reload, force-cache, only-if-cached
cache: "default", // *default, no-cache, reload, force-cache, only-if-cached
// credentials: "include", // include, same-origin, *omit
headers: {
"Content-Type": "application/json; charset=utf-8",
Expand Down

0 comments on commit 97e9a2a

Please sign in to comment.