https://github.com/capnspacehook/go-cache-prune
Prune unused files in Go module and build caches
https://github.com/capnspacehook/go-cache-prune
Last synced: 26 days ago
JSON representation
Prune unused files in Go module and build caches
- Host: GitHub
- URL: https://github.com/capnspacehook/go-cache-prune
- Owner: capnspacehook
- License: unlicense
- Created: 2023-08-18T17:03:14.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-11-28T06:24:54.000Z (over 2 years ago)
- Last Synced: 2025-07-18T15:57:29.686Z (11 months ago)
- Language: Go
- Homepage:
- Size: 79.1 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-cache-prune
A utility to prune unneeded files from Go's module and build caches. The motivation was using [`actions/cache`](https://github.com/actions/cache) to [update existing Github Actions caches](https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache) with only necessary files to reduce their size. `go-cache-prune` will listen for file access or create events for files in the Go caches, and keep track of what files were used. When `go-cache-prune` receives a SIGHUP signal, it will stop listening for file events and delete all files in both Go caches it didn't record as being used.
Signaling a running `go-cache-prune` process can easily be done with `go-cache-prune -signal`.