Workbox is caching only time stamps to indexDb, how to intercept with json data in indexDb?

Viewed 1644

Below route defines to store json data as MyCachedData in cache storage, and IndexDb only stores the url and timestamp.

workboxSW.router.registerRoute('/MyApi(.*)',
workboxSW.strategies.staleWhileRevalidate({
    cacheName: 'MyCachedData',
    cacheExpiration: {
        maxEntries: 50
    },
    cacheableResponse: {statuses: [0, 200]}
 })
);

Is it possible to store the json data in the index db only and how can you define it to intercept (add, update, delete) using Workbox?

2 Answers
Related