Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Commit

Permalink
less precaching, more runtime caching
Browse files Browse the repository at this point in the history
  • Loading branch information
notwaldorf committed Jun 2, 2016
1 parent 623c081 commit 6ff665e
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,22 +90,34 @@ function writeServiceWorkerFile() {
var config = {
cacheId: 'polymerproject',
staticFileGlobs: [
rootDir + '/images/logos/p-author-logo.png',
rootDir + '/images/logos/p-logo.png',
rootDir + '/images/logos/p-logo-32.png', /* Be conservative with the images */
rootDir + '/elements/**',
rootDir + '/js/*.js',
rootDir + '/css/*.css',
// rootDir + '/1.0/index.html',
// rootDir + '/1.0/index.html', /* Don't need to cache the 404 pages */
// rootDir + '/1.0/blog/**/*',
// rootDir + '/1.0/docs/**/*',
// rootDir + '/1.0/start/**/*',
// rootDir + '/1.0/toolbox/**/*',
rootDir + '/1.0/index.html',
rootDir + '/bower_components/**/webcomponents-lite.js',
],
navigateFallback: '/1.0/index.html',
runtimeCaching: [{
urlPattern: /app\/\/1\.0\/blog\/*/,
urlPattern: /\/1\.0\/index\.html/,
handler: 'fastest',
},
{
urlPattern: /\/1\.0\/docs\/*/,
handler: 'fastest',
},
{
urlPattern: /\/1\.0\/start\/*/,
handler: 'fastest',
},
{
urlPattern: /\/1\.0\/toolbox\/*/,
handler: 'fastest',
},
{
urlPattern: /\/1\.0\/blog\/*/,
handler: 'fastest',
options: {
cache: {
Expand Down

0 comments on commit 6ff665e

Please sign in to comment.