Skip to content

Commit

Permalink
#40 remove caching on horizon resources - appears to be the reason th…
Browse files Browse the repository at this point in the history
…at chromium starts requesting multiple streams ..
  • Loading branch information
Chris Hatch committed Feb 24, 2018
1 parent 5d5e837 commit 65177bb
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,33 +315,6 @@ module.exports = {
// Don't precache sourcemaps (they're large) and build asset manifest:
staticFileGlobsIgnorePatterns: [/\.map$/, /asset-manifest\.json$/],
runtimeCaching: [
{ // Requests for a single ledger, tx or operation are cached
// heavily as they don't change once included in the ledger.
urlPattern: /^https:\/\/horizon(-testnet)?\.stellar\.org\/[lot]+[^/]+\/[0-9a-f]/,
handler: 'cacheFirst',
options: {
cache: {
name: 'horizon-long-cache',
maxAgeSeconds: 30 * 24 * 60 * 60
},
},
},
{ // All other horizon requests: lists of ops, txs, ledgers and account
// requests are cached for a short time only and are fetched with
// 'fastest'. This means both cache and network will be fetched.
// Cache will return first but when network is finished in the
// background it will update the cache with the latest.
// This short term caching speeds up quite a few use cases of
// navigating from list to list and item to item in a short time.
urlPattern: /^https:\/\/horizon(-testnet)?\.stellar\.org\//,
handler: 'fastest',
options: {
cache: {
name: 'horizon-short-cache',
maxAgeSeconds: 20
},
},
},
{ // Cache the stellarterm directory for a couple of days as the asset
// lists don't change often
urlPattern: /^https:\/\/api\.stellarterm\.com\/v1\/ticker.json/,
Expand Down

0 comments on commit 65177bb

Please sign in to comment.