What is Chrome default cache size limit? Where it can be found?
3 Answers
According to Chromium source, it uses kDefaultCacheSize = 80 * 1024 * 1024 Bytes --> 80MiB and applies the first matching rule of the following to determine the actual (disk, HTTP) cache size
- 80% of the available space if there is not enough space to use kDefaultCacheSize
- kDefaultCacheSize if it uses 10% to 80% of the available space
- 10% of the available space if the target size (2.5 * kDefaultCacheSize) is more than 10%
- the target size (2.5 * kDefaultCacheSize) if it uses 10% to 1% of the available space
- 1% of the available space
So that should be 10% of the available disk space at startup in the common case, with a moderately filled HDD.
-
3If I understand this correctly, the common cache size should be 1% of the available disk space, not 10%, considering most users should have more than 20,000MiB of available space. Or maybe a fixed cache size of 200MiB for users with less than 20,000MiB but more than 2,000MiB. That 10% only applies if user has less than 2,000MiB available (but more than 800MiB). I doubt most users fill storage to the brim like that, at least on desktops, though this might be more common in phones if the same calculation applies there. Apr 26, 2021 at 10:23
-
I think in practice there's an upper bound from chromium.googlesource.com/chromium/src/+/master/net/disk_cache/… of 4 * kDefaultCacheSize (= 320 MiB). So in the case that the free disk space exceeds 400 * kDefaultCacheSize (= 32000 GiB ~ 32 GB), that hard limit applies. When I check cache usage empirically on devices that have way over that much free space (e.g., ~100 GiB free), I see cache usage in the 240-320 MiB range. May 28, 2023 at 4:13
There isn't a default size for Cache in Google Chrome.
The maximum size of the cache is calculated as a percentage of available disk space. The default size is calculated at start time.
From: http://gent.ilcore.com/2011/02/chromes-10-caches.html
The maximum size of the cache is calculated as a percentage of available disk space. The contents can be viewed at chrome://net-internals/#httpCache. It can be cleared manually at chrome://settings/advanced or programmatically by calling chrome.benchmarking.clearCache() when Chrome is run with the --enable-benchmarking flag set. Note that for incognito windows this cache actually resides in memory.
Also, the article explains other 10 type of Caches like Memory Cache, DNS Cache etc.
-
2chrome://net-internals/#httpCache doesn't show me anything.... it says capturing, but nothing ever shows up– MichaelJul 6, 2018 at 4:24
-
-
- Create desktop shortcut
- Target:
"C:\Program Files\Google\Chrome\Application\chrome.exe" --disk-cache-size = 1073741824
(In bytes, here 1GB are allowed)
-
1Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.– Community BotNov 2, 2022 at 19:02