feat: add tarballs caching
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user