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 committed May 7, 2019
1 parent b8fb707 commit b3c7cb3
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 b3c7cb3

Please sign in to comment.