diff --git a/config/webpack.config.js b/config/webpack.config.js index bf764421..6337e90e 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -668,6 +668,19 @@ module.exports = function(webpackEnv) { new RegExp(/^\/api/), new RegExp(/^\/custom/), ], + runtimeCaching: [ + { + urlPattern: new RegExp(/.*\/thumb\/.*/i), + handler: 'StaleWhileRevalidate', + options: { + cacheName: 'thumbnail-cache', + expiration: { + maxEntries: 100, + maxAgeSeconds: 30 * 24 * 60 * 60, + }, + }, + } + ] }), // TypeScript type checking useTypeScript &&