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 May 8, 2019
1 parent 2b5143c commit ea67ca9
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 ea67ca9

Please sign in to comment.