https://pantsbuild.org/ logo
#general
Title
# general
g

gray-shoe-19951

12/21/2022, 3:59 PM
Another quick question on cache, as of now, what is the best way to "clean" the cache? I guess there is no tool to manage cache at the moment.
h

happy-kitchen-89482

12/21/2022, 4:04 PM
You generally shouldn't need to, since the cache keys are very strict. If you're trying to force-rerun a successful test you can use
./pants test --force
. Or you can run with
./pants --no-local-cache
to turn off the cache for the run. Or if you really want to nuke the cache, it's under
~/.cache/pants
by default (there are a few different caches there).
What's your need here?
c

curved-television-6568

12/21/2022, 4:34 PM
You generally shouldn’t need to
I don’t think this is really true, over time it’ll add up — to a lot, as iirc not all caches are gc’ed.
g

gray-shoe-19951

12/21/2022, 4:36 PM
Yep agree with @curved-television-6568. Depends on the size, the cache location will eventually blow up. So I am wondering what actions I can take besides just delete the whole cache.
r

refined-addition-53644

12/21/2022, 5:04 PM
Yeah I have seen caches as big as 60 GBs locally. Although this could also have been because I had multiple pants versions locally.
🙈 1
h

happy-kitchen-89482

12/21/2022, 9:06 PM
Oh I see, for that reason. Yes, nuke ~/.cache/pants
and, in CI, use remote caching 🙂
5 Views