Is there. way to change the cache location of pant...
# general
m
Is there. way to change the cache location of pants?
Copy code
${HOME}/.cache/pants
To another location?
1
n
You can use the options named_caches_dir and local_store_dir to control this.
Additionally, I believe you can control where the pants binary’s Python interpreter and other data is cached by setting
SCIE_BASE
, which is useful in CI.
👍 1
m
Thanks!
🖖 1
c
This is what we have for
/etc/profile
on our CI workers..
Copy code
# Pants installations goes into this tree.
export SCIE_BASE=<%= @cache_root_dir %>/nce

# Stores the results of running subprocesses and of some file operations.
export PANTS_LOCAL_STORE_DIR=<%= @cache_root_dir %>/lmdb_store

# Stores the caches for certain tools used by Pants, like PEX's cache for resolving Python requirements.
export PANTS_NAMED_CACHES_DIR=<%= @cache_root_dir %>/named_caches
p
Hey @curved-television-6568 I’m curious is the
cache_root_dir
on your CI workers shared between workers? Meaning is it on some network share or local to each CI server?
c
yea nothing fancy for now, so just local for each.
👍 1
p
Roger that. Do you have long-running CI workers then? Otherwise the cache get blown away each time (or on whatever schedule the CI workers cycle) and thus kind of defeating the point of local caching in CI