Documentation
¶
Overview ¶
Package paths resolves on-disk locations for Cog's per-user caches.
Callers SHOULD route every cache lookup through this package so a single environment variable (COG_CACHE_DIR) can relocate all of Cog's caches in one step — useful when the default cache directory lives on a different filesystem than the user's project tree and hardlinking would fail with EXDEV.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WeightsStoreDir ¶
WeightsStoreDir returns the directory that backs the local content-addressed weight file store.
Resolution order:
- $COG_CACHE_DIR/weights, if COG_CACHE_DIR is set.
- $XDG_CACHE_HOME/cog/weights, if set.
- $HOME/.cache/cog/weights otherwise — on every platform.
Note the deliberate deviation from os.UserCacheDir, which returns $HOME/Library/Caches on macOS. Dev tooling conventionally lives under ~/.cache or ~/.<toolname>, not ~/Library, so we follow suit.
WeightsStoreDir does not create the directory; callers that need it to exist should MkdirAll it themselves (FileStore does).
Types ¶
This section is empty.