Skip to content

Commit

Permalink
Merge pull request #495 from shayc/fix/service-worker-external-symbol…
Browse files Browse the repository at this point in the history
…-sets-api

fix: caching external symbols
  • Loading branch information
martinbedouret authored Nov 2, 2019
2 parents bfbcab0 + 0cac0c3 commit 351610b
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions sw-precache-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,32 @@ module.exports = {
'build/static/**/!(*map*)',
...boardImages
],
maximumFileSizeToCacheInBytes: 4194304,
runtimeCaching: [
{
urlPattern: /\/images\//,
urlPattern: /\/symbols\/mulberry/,
handler: 'cacheFirst',
options: {
cache: {
name: 'images-cache'
name: 'symbols-mulberry'
}
}
},
{
urlPattern: /\/symbols\/arasaac/,
handler: 'cacheFirst',
options: {
cache: {
name: 'symbols-arasaac'
}
}
},
{
urlPattern: /\/symbols\/cboard/,
handler: 'cacheFirst',
options: {
cache: {
name: 'symbols-cboard'
}
}
}
Expand Down

0 comments on commit 351610b

Please sign in to comment.