feat: add tarballs caching

This commit is contained in:
 Ilya Atamas
2019-04-23 15:36:51 +03:00
parent d04603f529
commit 18338eb0d7
4 changed files with 31 additions and 24 deletions

View File

@@ -10,7 +10,7 @@ import (
// start a server
var listCmd = &cobra.Command{
Use: "list",
Short: "List all cached packages",
Short: "List all cached paths",
Run: func(cmd *cobra.Command, args []string) {
proxy := getProxy(func() (npmproxy.Options, error) {
return npmproxy.Options{
@@ -18,7 +18,7 @@ var listCmd = &cobra.Command{
}, nil
})
metadatas, err := proxy.ListMetadata()
metadatas, err := proxy.ListCachedPaths()
if err != nil {
panic(err)
}

View File

@@ -8,7 +8,7 @@ import (
// start a server
var purgeCmd = &cobra.Command{
Use: "purge",
Short: "Purge all cached packages",
Short: "Purge all cached paths",
Run: func(cmd *cobra.Command, args []string) {
proxy := getProxy(func() (npmproxy.Options, error) {
return npmproxy.Options{
@@ -16,7 +16,7 @@ var purgeCmd = &cobra.Command{
}, nil
})
err := proxy.PurgeMetadata()
err := proxy.PurgeCachedPaths()
if err != nil {
panic(err)
}