-
Select Topic AreaQuestion BodyI got a GitHub mail,
later is says
I can not think about an action in a repo that would use so much cache. How can I find out which repo uses the most cache? |
Beta Was this translation helpful? Give feedback.
Replies: 10 comments · 15 replies
This comment was marked as off-topic.
This comment was marked as off-topic.
-
Check cache usage in individual repositories GitHub recently added a way to inspect caches: Go to a repo → Settings → Actions → Caches. There you’ll see all cache entries, their sizes, and when they were last used. Sort by size to quickly see the largest offenders. |
Beta Was this translation helpful? Give feedback.
-
You can check this with the GitHub CLI (replace rdtechie, which is my account, with your own):
It will cycle through your repositories, shows the caches in each one (press |
Beta Was this translation helpful? Give feedback.
-
GitHub’s cache system is per repository, and you can query it with the GitHub CLI (gh). Replace ORG with your organization nameThis loops through all repos in the org and lists cache sizesgh repo list ORG --limit 1000 --json nameWithOwner This will: Go through every repo in your org Fetch its Actions caches Show each cache’s key and its size in GB You can then sort by size and instantly spot the repo eating 10GB+ per day.
You can also manually check caches in the GitHub web UI (but not scalable for 100 repos): Go to Repo → Settings → Actions → Caches You’ll see cache keys, last accessed date, and sizes. But with 100+ repos, CLI is 100x faster.
Once you find the culprit repo, you can nuke unnecessary caches from CLI too: Delete all caches for a repogh api --method DELETE /repos/ORG/REPO/actions/caches Or delete by cache key if you only want to clear specific ones: gh api --method DELETE /repos/ORG/REPO/actions/caches
You might also want to check your workflows: Are you caching node_modules, target, vendor, or other huge folders unnecessarily? Maybe you’re using a cache key that changes on every run (leading to many unique caches). |
Beta Was this translation helpful? Give feedback.
-
I'm still stuck on solving this one. I have gone through every single org listed on my Organizations page and none of them has a repo with a cache anywhere near 10GB in size. What can I do next? |
Beta Was this translation helpful? Give feedback.
-
If you have a Github enterprise org you can find the cache overview by size at https://github.com/organizations/orgname/settings/actions/caches |
Beta Was this translation helpful? Give feedback.
-
The mail was received here as well, and it's suspicious to say the least. Within our org with multiple admins, only one received the mail, and the links in the mail go to That, along with the urgency, the typos, and no communication from GitHub before this: it's probably phishing. Ignore. |
Beta Was this translation helpful? Give feedback.
-
Is there any information about billing for repos which exceed 10GB? Ideally I would like the behavior to act as before, just auto-delete any cache which exceeds the 10 GB limit. From my understanding this will no longer be possible after October 15th. Is anyone interpretating it in a different manner? |
Beta Was this translation helpful? Give feedback.
-
You can do this with the GitHub CLI. For example: Here’s what it does: |
Beta Was this translation helpful? Give feedback.
-
My question here is: How can our organization increase the cache size? Is there some sort of setting to set? So far I have only found documentations on the cache size listing and cache deleting, but I have not seen any mentions on how to actually increase the cache size, be it above 10GB or keeping it that way to avoid additional billings. Any help? |
Beta Was this translation helpful? Give feedback.
You can check this with the GitHub CLI (replace rdtechie, which is my account, with your own):
gh repo list rdtechie --json nameWithOwner -q '.[].nameWithOwner' | xargs -n1 gh cache list -R
It will cycle through your repositories, shows the caches in each one (press
q
to go to the next entry).