aboutsummaryrefslogtreecommitdiff
path: root/docs/luarocks_admin_refresh_cache.md
diff options
context:
space:
mode:
Diffstat (limited to '')
-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```