cache icon indicating copy to clipboard operation
cache copied to clipboard

Cache Hit / Miss Rate Information

Open edhgoose opened this issue 1 year ago • 2 comments

Hi,

We're using the actions/cache action, and are trying to optimise its usage across many different actions.

One of the things which would be very helpful to understand is the hit/miss rate. While we can work it out by reading the output of an individual action, working out the cache rate on aggregate across many actions is harder.

We'd love to be able to see a cache hit/miss rate for different caches so we can determine if the caches are performing well or not.

Would this be possible to add?

Thanks, Ed

edhgoose avatar Mar 11 '24 09:03 edhgoose

Very much agreed. I stumbled on this blog post: https://github.blog/changelog/2022-03-17-view-cache-usage-in-your-action-workflows/

The available rest APIs seem very useless: https://docs.github.com/en/rest/actions/cache

All responses boil down to:

{
  "total_active_caches_size_in_bytes": 3344284,
  "total_active_caches_count": 5
}

Please add a hit rate in all of those.

@edhgoose Any luck coming up with something?

jybp avatar Feb 27 '25 14:02 jybp

I've not looked any further I'm afraid. Would love the improvement still.

edhgoose avatar Feb 27 '25 15:02 edhgoose