My space doesn't locally cache models

When creating my first space by following HF docs (hot dog image classifier), i noticed the model isn’t cached locally.

i created HF_HOME and HF_HUB_CACHE env variable sys to point to desired cache folder

Testing with huggingface-cli, i was able to download and locally cache models in HF_HOME.

Here is what i get when i use scan_cache_dir() from space app.py

HFCacheInfo(size_on_disk=0, repos=frozenset(), warnings=[CorruptedCacheException(‘Repo path is not a directory: /home/user/.cache/huggingface/hub/version.txt’)])

What can i do to tell HF hub to point to HF_HOME and cache locally?