Docs
Search docs

List a repository's Actions cache entries

GET/api/repos/{owner}/{repo}/actions/caches

listRepositoryActionsCaches

One page of the repo's `actions/cache` entries in key order (keyset on `after`), the whole cache's totals, and 7-day usage from the repo's runs: per-entry hits, restore outcomes and the compile cache. Every 7-day aggregate is `null` when nothing reported it — absence, not zero. `can_delete` is the viewer's repo-write decision.

Authentication optional — this operation also accepts anonymous requests. When authenticating, use a bearer token or a session cookie.

curl

curl -X GET 'https://neosource.dev/api/repos/OWNER/REPO/actions/caches' \
  -H 'Authorization: Bearer $NEOSOURCE_TOKEN'

fetch

fetch("https://neosource.dev/api/repos/OWNER/REPO/actions/caches", {
  method: "GET",
  headers: {
    Authorization: "Bearer $NEOSOURCE_TOKEN",
  },
});

Path parameters

ownerrequired

Repository owner or organization slug.

string

reporequired

Repository name.

string

Query parameters

after

Keyset cursor: the previous page's `next_cursor` (a cache key). Entries are ordered by key, so this returns keys strictly after it.

string

limit

Page size; default 100, 1–100.

integerint32

Responses

200Cache entries

application/json

RepoCacheListResponse

object

`GET /api/repos/{owner}/{repo}/actions/caches`.

can_deleterequired

boolean

Whether the viewer may delete entries — the same repo-write decision the delete route makes. A hint for rendering; the route decides.

compile_7d
one of
  • CompileCacheWindowSummary

    object

    The compile cache (sccache) over a window, summed across the executed jobs that reported one.

    estimated_saved_ms

    integer | nullint64

    Summed per-job modelled saving (`JobCompileCache` model), in ms of MACHINE time — jobs run in parallel, so this is not wall-clock. `null` when no job could model one.

    hitsrequired

    integerint64

    jobsrequired

    integerint64

    Jobs that reported a compile cache.

    missesrequired

    integerint64

    requestsrequired

    integerint64

    saving_jobsrequired

    integerint64

    Jobs whose modelled saving was positive — the only ones `estimated_saved_ms` is summed over.

  • null

entriesrequired

array

One page, in key order.

items

RepoCacheEntry

object

One `actions/cache` entry of the repo.

created_atrequired

integerint64

Epoch ms.

entry_idrequired

string

UUID; the `{entry_id}` of the delete route.

hits_7d

integer | nullint64

Restores that hit this key (exact or partial) in the repo's runs of the last 7 days. `null` when no restore in that window reported an outcome at all (`restores_7d` is `null`) — then `0` would be a claim the data cannot make. Otherwise `0` is a real zero.

keyrequired

string

last_accessed_atrequired

integerint64

Epoch ms of the last restore that hit it (bumped at most once per touch resolution, so it can trail the true last use slightly).

size_bytesrequired

integerint64

next_cursor

string | null

Pass as `after` for the next page; `null` on the last page.

restores_7d
one of
  • CacheRestoreCounts

    object

    Recorded restore outcomes over a window. Steps that said nothing about caching are in none of the three.

    exactrequired

    integerint64

    missrequired

    integerint64

    partialrequired

    integerint64

  • null

total_entriesrequired

integerint64

Entries across the whole repo cache, not this page.

total_size_bytesrequired

integerint64

Bytes across the whole repo cache, not this page.

Standard errors

Bodies documented once for the whole API — see standard errors.

  • 400Bad Request — one of: invalid_input
  • 403Forbidden — one of: forbidden
  • 404Not Found — one of: not_found
  • 423Locked — one of: busy
  • 429Rate limited — retry after the `Retry-After` header
  • 500Internal server error
  • 503Service temporarily unavailable / at capacity — retry after the `Retry-After` header
  • 504Gateway timeout — the request exceeded the server's handling budget