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

Function deleteCacheByID

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

Source from the content-addressed store, hash-verified

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