Constructor

BroadcastCacheUpdatePlugin

new BroadcastCacheUpdatePlugin()

Example

<caption>Add a BroadcastCacheUpdatePlugin to a `RequestWrapper` to
dispatch messages on a cache update.</caption>

const requestWrapper = new workbox.runtimeCaching.RequestWrapper({
  cacheName: 'runtime-cache',
  plugins: [
    new workbox.broadcastCacheUpdate.Plugin({channelName: 'cache-updates'})
  ]
});
const route = new workbox.routing.RegExpRoute({
  match: ({url}) => url.domain === 'example.com',
  handler: new workbox.runtimeCaching.StaleWhileRevalidate({requestWrapper})
});