This guide describes the cache types supported by Chromium and shows how to work with them.
Chromium supports the following cache types:
- HTTP cache
- Blink cache
- HTML5 AppCache
When any resource request is made from a page, it first goes through the Blink loader and the Blink cache. A request to the browser process may or may not be issued from there. As it goes through the browser’s network stack, it reaches the HTTP (disk or memory) cache. There is no explicit communication from a page to the cache.
HTML5 AppCache is used explicitly by a web page. It stores data independently of the other caches.
By default, the HTTP cache stores the resources fetched from the web on a disk or in the memory. Chromium itself decides how to cache the resources for optimal performance.
The memory cache stores and loads the resources to and from the process memory—RAM. It is a fast but non-persistent way.
The content is available only until you close the
The disk cache is persistent. The cached resources are stored and loaded to and from the disk.
On Windows the disk cache is stored in the
Cache folder in the user data directory
and may look like this:
On macOS and Linux, the disk cache is stored in the user’s temp directory.
On macOS, it may look like:
In the Incognito mode Chromium stores the resources only in
the memory and does not use the disk. The cached resources are only available until you delete the
Profile or close
Clearing HTTP cache
To clear the HTTP cache associated with a specific
Profile and wait
until all the cache entries are marked for deletion:
std::cout << "Cache is empty" << std::endl;