blob: e41293c0054e160a53f2370f43aaae6dedf3d83f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# luarocks-admin refresh cache
Refresh local cache of a remote rocks server.
## Usage
`luarocks-admin refresh-cache [--from=<server>]`
The flag `--from` indicates which server to use. If not given, the default
server set in the `upload_server` variable from the [configuration
files](config_file_format.md) is used instead. You need to either explicitly
pass a full URL to `--from` or configure an upload server in your
configuration file prior to using the `refresh-cache` command.
## Examples
### Basic example
Refresh the cache of your main upload server:
```
luarocks-admin refresh-cache
```
### Handling multiple repositories
Assuming your `~/.luarocks/config.lua` file looks like this:
```lua
upload_server = "main"
upload_servers = {
main = {
http = "www.example.com/repos/main",
sftp = "myuser@example.com/var/www/repos/main"
},
dev = {
http = "www.example.com/repos/devel-rocks",
sftp = "myuser@example.com/var/www/repos/devel-rocks"
},
}
```
you can specify which cache to refresh with the `--from` flag:
```
luarocks-admin refresh-cache --from=dev
```
|