Skip to content

Commit

Permalink
Added caching invalidation scheme to version text in client/actions/v…
Browse files Browse the repository at this point in the history
…ersion.js (#10416)
  • Loading branch information
Igi-ID authored Jun 25, 2024
1 parent 7443a48 commit 3edf3e6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion web/client/actions/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ export function loadVersionError(e) {
*/
export function loadVersion(config = 'version.txt') {
return (dispatch) => {
return axios.get(config).then((response) => {
return axios.get(config, {
params: {
t: new Date().getTime()
}
}).then((response) => {
dispatch(changeVersion(response.data));
}).catch((e) => {
dispatch(loadVersionError(e));
Expand Down

0 comments on commit 3edf3e6

Please sign in to comment.