transferSize reported as 0 on mainThread when StaleWhileRevalidate has a cache miss and hits network
See original GitHub issueLibrary Affected: workbox-strategies v4.3.1
Browser & Platform: all browsers.
Issue: transferSize
reported as 0 on mainThread when StaleWhileRevalidate has a cache miss and hits network:
I manually deleted the entire cache and reloaded the page.
If it hits cache, the numbers are as below.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
What's a Cache Miss? Policies That Reduce ... - Hazelcast
A cache miss occurs when a system or application makes a request to retrieve data from a cache, but that specific data is...
Read more >Cache Miss – What It Is and How to Reduce It
Cache miss suggests that requested data is not available in cache memory. Read on to learn how to reduce them and make the...
Read more >How to calculate L1 and L2 cache miss rate?
Hello, everyone: I am a new user of Intel Vtune. I want to measure the L1 and L2 cache miss rate on intel...
Read more >What is a cache hit ratio? - Cloudflare
A cache hit ratio is calculated by dividing the number of cache hits by the total number of cache hits and misses, and...
Read more >What are Hit and Miss Ratios? Learn how to calculate them!
Did you know you can find out how well your cache is performing by calculating hit and miss ratios in caches? Here's how...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yep,
event.clientId
will not not be set for navigation requests, as the client doesn’t exist yet.The
fetch
event that initiated the navigation should have aresultingClientId
property, which can be used to later match against the Clients API in the service worker.Unfortunately, not all browsers support this property, but here’s some code we use in Workbox to deal with that (that use can use as an example): https://github.com/GoogleChrome/workbox/blob/04ba6442c466d2e8197fe586672143d201af3a61/packages/workbox-core/src/_private/resultingClientExists.ts