Skip to content

Github Actions Cache Usage

TheOneric edited this page Nov 16, 2022 · 4 revisions

Since around November 2022 GitHub has a Caches page in the UI showing the individual caches by key and how much space they take up. The overall size is only shown (in a warning box) when approaching the limit though. This page also allows manually deleting individual caches.
I couldn’t find any indication of how much cache storage is used by an repo, only documentation on API-endpoints about it. So for future reference, here it is:

Check total cache usage:

curl -H "Accept: application/vnd.github+json" https://api.github.com/repos/libass/libass-tests/actions/cache/usage

List all kept cache keys and their data’s size individually:

curl -H "Accept: application/vnd.github+json" https://api.github.com/repos/libass/libass-tests/actions/caches

Full cache API docs here, the above don’t need an access token.

At the time of writing the limit per repo is 10GB, but keep in mind that caches are not (always) shared between branches and when one cache key changes during an upgrade, temporarily both the old and new key's data will count towards the limit (until the old key eventually gets deleted). If during an upgrade the limit is exceeded, the old key may not be the first choice for deletion yet.

The information also shows that msys2/setup-msys2 will create a cache entry even with update: false, but the cache is tiny with less than 200 bytes.

Clone this wiki locally