aboutsummaryrefslogtreecommitdiff
path: root/docs/luarocks_admin_refresh_cache.md
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2025-01-05 21:40:39 -0300
committerHisham Muhammad <hisham@gobolinux.org>2025-02-21 11:22:43 -0300
commit7e86fa86b4d08fd6118d6eab46d92b29ffea791e (patch)
tree10fdd12beed4b0eca408533ad11d1f52d7d62e10 /docs/luarocks_admin_refresh_cache.md
parent1ada2ea4bbd94ac0c58e3e2cc918194140090a75 (diff)
downloadluarocks-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.md47
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
3Refresh local cache of a remote rocks server.
4
5## Usage
6
7`luarocks-admin refresh-cache [--from=<server>]`
8
9The flag `--from` indicates which server to use. If not given, the default
10server set in the `upload_server` variable from the [configuration
11files](config_file_format.md) is used instead. You need to either explicitly
12pass a full URL to `--from` or configure an upload server in your
13configuration file prior to using the `refresh-cache` command.
14
15## Examples
16
17### Basic example
18
19Refresh the cache of your main upload server:
20
21```
22luarocks-admin refresh-cache
23```
24
25### Handling multiple repositories
26
27Assuming your `~/.luarocks/config.lua` file looks like this:
28
29```lua
30upload_server = "main"
31upload_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
43you can specify which cache to refresh with the `--from` flag:
44
45```
46luarocks-admin refresh-cache --from=dev
47```