Download and cache a URL locally.
Files are cached in ~/.cache/<pkg>/.
- Parameters:
url (str) – URL to download.
pkg (str) – Package name for cache subdirectory.
update (bool) – Force re-download if True.
- Returns:
Path to the cached file.
- Return type:
str