Skip to content

Commit c476875

Browse files
committed
Move default cache dir to user home/.mbed/
Enable repo caching as default behavior
1 parent 7e6d7cc commit c476875

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mbed/mbed.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1711,12 +1711,12 @@ def list(self):
17111711

17121712
# Get cache configuration
17131713
def cache(self):
1714-
cache_cfg = self.get('CACHE', None)
1714+
cache_cfg = self.get('CACHE', 'enabled')
17151715
cache_val = 'enabled' if cache_repositories and cache_cfg and cache_cfg != 'none' and cache_cfg != 'off' and cache_cfg != 'disabled' else 'disabled'
17161716

17171717
cache_dir_cfg = self.get('CACHE_DIR', None)
17181718
loc = cache_dir_cfg if cache_dir_cfg != 'default' else (cache_cfg if (cache_cfg and cache_cfg != 'on' and cache_cfg != 'off' and cache_cfg != 'none' and cache_cfg != 'enabled' and cache_cfg != 'disabled') else None)
1719-
cache_base = loc or tempfile.gettempdir()
1719+
cache_base = loc or Global().path
17201720
return {'cache': cache_val, 'cache_base': cache_base, 'cache_dir': os.path.join(cache_base, 'mbed-cache')}
17211721

17221722

0 commit comments

Comments
 (0)