# Unusually large Service Worker cache usage

**URL:** https://meta.discourse.org/t/unusually-large-service-worker-cache-usage/166801
**Category:** Self-hosting
**Tags:** server-resources
**Created:** [October 9, 2020, 8:58pm UTC](https://meta.discourse.org/t/unusually-large-service-worker-cache-usage/166801 "2020-10-09T20:58:25Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![dtinth](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dtinth/32/196637_2.png) [@dtinth](https://meta.discourse.org/u/dtinth)
#### Post date: [October 9, 2020, 8:58pm UTC](https://meta.discourse.org/t/unusually-large-service-worker-cache-usage/166801/1 "2020-10-09T20:58:25Z")

</div>

While I try to free up my disk space, I noticed that my Google Chrome profile is consuming an unusually large amount of disk space. The file system visualization tool points to the Service Worker Cache Storage folder consuming a lot of disk space.

To see the top list of sites, in Google Chrome, go to **Settings** → **Privacy and security** → **Site Settings** → **View permissions and data stored across sites** → Sort by: **Data stored**.

Then I see this… (I showed the top 2 subdomains for each site for comparison) …and noticed a pattern. Most of them belong to Discourse instances.

 ![Artboard](https://global.discourse-cdn.com/meta/original/3X/5/a/5ad43781258f47debc6b3125dc06f63c057a7050.png)

After clearing the cache storage consumed by Discorse, **5 GB of disk space has been freed.** (From 8.2 GB → 3.2 GB.)

 ![Artboard](https://global.discourse-cdn.com/meta/original/3X/c/0/c052185a4890cd2a4a5ca34ae7073837e9d41f7b.png)

Not sure if this is a bug in Discourse or why across the web Discourse instances seem to take up majority of the service worker cache.

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [October 9, 2020, 9:00pm UTC](https://meta.discourse.org/t/unusually-large-service-worker-cache-usage/166801/2 "2020-10-09T21:00:59Z")

</div>

Unfortunately this is a quirk of how chrome reports cache usage. The space reported doesn’t accurately reflect the space used on disk. We’re working on some improvements to work around the problem, but they’re not quite ready yet. You can find some more info here:

> [@High local storage reported by Chrome](https://meta.discourse.org/t/high-local-storage-reported-by-chrome/165233/2):
>
> This is a know Chrome quirk where it misreports by a lot (100MB may be reported as 5GB). We are actively working on ways to mitigate this issue as we get frequent reports, but it is quite complicated as it involves assets served from CDNs. You can read more about it in [https://www.androidpolice.com/2019/09/16/google-chrome-site-settings-cache/#1](https://www.androidpolice.com/2019/09/16/google-chrome-site-settings-cache/#1)

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [November 8, 2020, 9:03pm UTC](https://meta.discourse.org/t/unusually-large-service-worker-cache-usage/166801/3 "2020-11-08T21:03:20Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
