Select the appropriate cache sharing approach based on your execution environment to maximize performance and efficiency. When working with containerized applications:

  1. For local development or long-running VMs:
  2. For CI environments (both parallel and sequential):

Example for sharing cache in Docker containers:

# Docker container cache sharing
volumes:
  - ./cache:/root/.cache/uv

Keep cache configurations simple by default and only add specialized invalidation patterns when necessary. For most cases, the default cache behavior is sufficient.