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

sparse-lifeguard-95737

05/25/2022, 6:43 PM
the docs on “pants in CI” recommend caching
~/.cache/pants/named_caches
, but in our repo I find that the size of that dir can grow pretty quickly & dramatically. is there a “safe” subset of that dir we could cache to keep our cache sizes small while still reaping some benefits? I feel like when I’ve poked around in that dir before I’ve seen symlinks between different subdirectories, which makes me worry about the feasibility of only caching a subset
w

witty-crayon-22786

05/25/2022, 6:49 PM
but: if you are successfully using a remote cache, or saving
~/.cache/pants/lmdb_store
, then you don’t need to keep the named caches
s

sparse-lifeguard-95737

05/25/2022, 6:51 PM
🤔 hmmm ok, we do have remote caching set up but don’t see it used as much as we’d like (probably because our code is so tangled it’s very easy to bust the cache). so trying to keep a size-limited local cache around as well to minimize the amount of re-done work in cases like that
w

witty-crayon-22786

05/25/2022, 7:10 PM
the “local cache” is in `~/.cache/pants/lmdb_store`… the named caches only come in to play when you miss the local cache
one case where that can happen is when you’ve changed your thirdparty requirements (so you’re expecting to miss the local cache), and need to actually-re-run a thirdparty resolve. if you need to re-run a resolve, the named caches can accelerate that, because they contain a pip cache
s

sparse-lifeguard-95737

05/25/2022, 7:12 PM
yes that is the exact use-case we’re trying to solve for
… without blowing through GHA’s 10gb-of-cache-per-repo quota
w

witty-crayon-22786

05/25/2022, 7:52 PM
bumping that ticket might be helpful then, yea. John has the most knowledge about the contents of the pex_root
👍 1
3 Views