MCPcopy Create free account
hub / github.com/cli/cli / deleteCacheByID

Function deleteCacheByID

pkg/cmd/cache/delete/delete.go:204–211  ·  view source on GitHub ↗
(client *api.Client, repo ghrepo.Interface, id int64)

Source from the content-addressed store, hash-verified

202}
203
204func deleteCacheByID(client *api.Client, repo ghrepo.Interface, id int64) error {
205 // returns HTTP 204 (NO CONTENT) on success
206 path, err := safeurl.JoinPath("repos", repo.RepoOwner(), repo.RepoName(), "actions", "caches", strconv.FormatInt(id, 10))
207 if err != nil {
208 return err
209 }
210 return client.REST(repo.RepoHost(), "DELETE", path.String(), nil, nil)
211}
212
213// deleteCacheByKey deletes cache entries by given key (and optional ref) and
214// returns the number of deleted entries.

Callers 1

deleteCachesFunction · 0.85

Calls 6

JoinPathFunction · 0.92
RepoOwnerMethod · 0.65
RepoNameMethod · 0.65
RESTMethod · 0.65
RepoHostMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected