Skip to content

Commit c5a0d01

Browse files
committed
Fix documentation and leftover print
1 parent 172b5ca commit c5a0d01

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -853,26 +853,26 @@ Use these with caution because your uncommitted changes and unpublished librarie
853853

854854
## Repository caching
855855

856-
To minimize traffic and reduce import times, by default Mbed CLI would cache repositories by storing their indexes under the Mbed CLI user config folder - typically `~/.mbed/mbed-cache/` on UNIX systems, or `%userprofile%/.mbed/mbed-cache/` on Windows systems. Compared to a fully checked out repository, indexes are significantly smaller in size and number of files, and contain the whole revision history of that repository. This allows Mbed CLI to quickly create copies of previously downloaded repository indexes and pull/fetch only the latest changes from the remote repositories, therefore dramatically reducing network traffic and download times, especially for big repositories like `mbed-os`.
856+
To minimize traffic and reduce import times, by default Mbed CLI caches repositories by storing their indexes under the Mbed CLI user config folder - typically `~/.mbed/mbed-cache/` on UNIX systems, or `%userprofile%/.mbed/mbed-cache/` on Windows systems. Compared to a fully checked out repository, indexes are significantly smaller in size and number of files, and contain the whole revision history of that repository. This allows Mbed CLI to quickly create copies of previously downloaded repository indexes and pull/fetch only the latest changes from the remote repositories, therefore dramatically reducing network traffic and download times, especially for big repositories like `mbed-os`.
857857

858858
You can manage the Mbed CLI caching behavior with the following sub-commands:
859859

860860
```
861861
mbed cache [on|off|dir <path>|ls|purge|-h|--help]
862862
```
863863

864-
* `on` - Turn repository caching on. Will use either the default or the user specified cache directory.
864+
* `on` - Turn repository caching on. This will either use the user specified cache directory or the default one. See "dir".
865865
* `off` - Turn repository caching off. Note that this doesn't purge cached repositories. See "purge".
866866
* `dir` - Set cache directory. Set to "default" to let mbed CLI determine the cache directory location. Typically this is `~/.mbed/mbed-cache/` on UNIX systems, or `%%userprofile%%/.mbed/mbed-cache/` on Windows systems.
867867
* `ls` - List cached repositories and their size.
868868
* `purge` - Purge cached repositories. Note that this doesn't turn caching off.
869869
* `-h` or `--help` - Print cache command options.
870870

871-
If no sub-command is specified to `mbed cache`, then mbed CLI would print the current cache setting (ENABLED or DISABLED) and the path to the local cache directory.
871+
If no sub-command is specified to `mbed cache`, mbed CLI prints the current cache setting (ENABLED or DISABLED) and the path to the local cache directory.
872872

873-
For safety reasons, Mbed CLI will always use `mbed-cache` subfolder to a user specified location. This ensure that no user files will deleted during `purge` even if the user has specified root/system folder as a cache location (e.g. `mbed cache dir /` or `mbed cache dir C:\`).
873+
For safety reasons, Mbed CLI uses `mbed-cache` subfolder to a user specified location. This ensure that no user files will deleted during `purge` even if the user has specified root/system folder as a cache location (e.g. `mbed cache dir /` or `mbed cache dir C:\`).
874874

875-
**Security notice**: It's generally recommended to use cache location inside your profile home directory. If you use cache location outside your user home/profile, then other system users might be able to access the repository cache and therefore the data of the cached repositories
875+
**Security notice**: If you use cache location outside your user home/profile directory, then other system users might be able to access the repository cache and therefore the data of the cached repositories.
876876

877877

878878
## Mbed CLI configuration

mbed/mbed.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2846,7 +2846,6 @@ def get_size_(path):
28462846
action("Repository cache is %s." % str(cfg['cache']).upper())
28472847
action("Cache location \"%s\"" % cfg['cache_base'])
28482848
else:
2849-
print cmd
28502849
error("Invalid cache command. Please see \"mbed cache --help\" for valid commands.")
28512850

28522851

0 commit comments

Comments
 (0)