Skip to content

Commit

Permalink
Use custom fetch wrapper with timeout for fetch-with-cache
Browse files Browse the repository at this point in the history
  • Loading branch information
whymarrh authored and danjm committed Jun 17, 2019
1 parent b978c64 commit 96e4d87
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ui/app/helpers/utils/fetch-with-cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ import {
loadLocalStorageData,
saveLocalStorageData,
} from '../../../lib/local-storage-helpers'
import http from './fetch'

const fetch = http({
timeout: 30000,
})

export default function fetchWithCache (url, opts, cacheRefreshTime = 360000) {
const currentTime = Date.now()
Expand Down

0 comments on commit 96e4d87

Please sign in to comment.