Created
August 2, 2016 09:14
-
-
Save deanhume/2dd6039018e285ff5ea8de0948fac941 to your computer and use it in GitHub Desktop.
SW Toolbox caching example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
toolbox.router.get('/beer/css/(.*)', global.toolbox.cacheFirst, { | |
cache: { | |
name: 'beer-stylesheets', | |
maxEntries: 10, | |
maxAgeSeconds: 604800 | |
}, | |
// Set a timeout threshold of 2 seconds | |
networkTimeoutSeconds: 4 | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment