diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2025-01-05 21:40:39 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2025-02-21 11:22:43 -0300 |
commit | 7e86fa86b4d08fd6118d6eab46d92b29ffea791e (patch) | |
tree | 10fdd12beed4b0eca408533ad11d1f52d7d62e10 /docs/luarocks_admin_refresh_cache.md | |
parent | 1ada2ea4bbd94ac0c58e3e2cc918194140090a75 (diff) | |
download | luarocks-7e86fa86b4d08fd6118d6eab46d92b29ffea791e.tar.gz luarocks-7e86fa86b4d08fd6118d6eab46d92b29ffea791e.tar.bz2 luarocks-7e86fa86b4d08fd6118d6eab46d92b29ffea791e.zip |
docs: import Wiki docs into the main repo
Diffstat (limited to 'docs/luarocks_admin_refresh_cache.md')
-rw-r--r-- | docs/luarocks_admin_refresh_cache.md | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/docs/luarocks_admin_refresh_cache.md b/docs/luarocks_admin_refresh_cache.md new file mode 100644 index 00000000..e41293c0 --- /dev/null +++ b/docs/luarocks_admin_refresh_cache.md | |||
@@ -0,0 +1,47 @@ | |||
1 | # luarocks-admin refresh cache | ||
2 | |||
3 | Refresh local cache of a remote rocks server. | ||
4 | |||
5 | ## Usage | ||
6 | |||
7 | `luarocks-admin refresh-cache [--from=<server>]` | ||
8 | |||
9 | The flag `--from` indicates which server to use. If not given, the default | ||
10 | server set in the `upload_server` variable from the [configuration | ||
11 | files](config_file_format.md) is used instead. You need to either explicitly | ||
12 | pass a full URL to `--from` or configure an upload server in your | ||
13 | configuration file prior to using the `refresh-cache` command. | ||
14 | |||
15 | ## Examples | ||
16 | |||
17 | ### Basic example | ||
18 | |||
19 | Refresh the cache of your main upload server: | ||
20 | |||
21 | ``` | ||
22 | luarocks-admin refresh-cache | ||
23 | ``` | ||
24 | |||
25 | ### Handling multiple repositories | ||
26 | |||
27 | Assuming your `~/.luarocks/config.lua` file looks like this: | ||
28 | |||
29 | ```lua | ||
30 | upload_server = "main" | ||
31 | upload_servers = { | ||
32 | main = { | ||
33 | http = "www.example.com/repos/main", | ||
34 | sftp = "myuser@example.com/var/www/repos/main" | ||
35 | }, | ||
36 | dev = { | ||
37 | http = "www.example.com/repos/devel-rocks", | ||
38 | sftp = "myuser@example.com/var/www/repos/devel-rocks" | ||
39 | }, | ||
40 | } | ||
41 | ``` | ||
42 | |||
43 | you can specify which cache to refresh with the `--from` flag: | ||
44 | |||
45 | ``` | ||
46 | luarocks-admin refresh-cache --from=dev | ||
47 | ``` | ||