Skip to content

Commit 6a62e72

Browse files
Update --no-cache to --no-http-cache (#3163)
1 parent 4e14031 commit 6a62e72

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

docs/concepts/package-installation-process.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The general process is as follows:
2020
2. Acquire the package:
2121
- Check if the package (by exact identifer and version number) is already installed in the *global-packages* folder as described on [Managing the global packages and cache folders](../consume-packages/managing-the-global-packages-and-cache-folders.md).
2222

23-
- If the package is not in the *global-packages* folder, attempt to retrieve it from the sources listed in the [configuration files](../consume-packages/Configuring-NuGet-Behavior.md). [Package Source Mapping](../consume-packages/package-source-mapping.md) configurations are applied at this point. For online sources, attempt first to retrieve the package from the HTTP cache unless `-NoCache` is specified with `nuget.exe` commands or `--no-cache` is specified with `dotnet restore`. (Visual Studio and `dotnet add package` always use the cache.) If a package is used from the cache, "CACHE" appears in the output. The cache has an expiration time of 30 minutes.
23+
- If the package is not in the *global-packages* folder, attempt to retrieve it from the sources listed in the [configuration files](../consume-packages/Configuring-NuGet-Behavior.md). [Package Source Mapping](../consume-packages/package-source-mapping.md) configurations are applied at this point. For online sources, attempt first to retrieve the package from the HTTP cache unless `-NoHttpCache` is specified with `nuget.exe` commands or `--no-http-cache` is specified with `dotnet restore`. (Visual Studio and `dotnet add package` always use the cache.) If a package is used from the cache, "CACHE" appears in the output. The cache has an expiration time of 30 minutes.
2424

2525
- If the package has been specified using a [floating version](../consume-packages/Package-References-in-Project-Files.md#floating-versions), or without a minimum version, NuGet *will* contact all sources to figure out the best match.
2626
Example: `1.*`, `(, 2.0.0]`.

docs/consume-packages/Package-Restore.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ To avoid using packages in the HTTP cache:
189189

190190
- Clear the cache by using `nuget locals http-cache -clear` or `dotnet nuget locals http-cache --clear`.
191191
- Temporarily set the **NUGET_HTTP_CACHE_PATH** environment variable to a different folder.
192-
- For `nuget restore`, use the `-NoCache` option, or for `dotnet restore`, use the `--no-cache` option. These options don't affect restore operations through the Visual Studio Package Manager or Console.
192+
- For `nuget restore`, use the `-NoHttpCache` option, or for `dotnet restore`, use the `--no-http-cache` option. These options don't affect restore operations through the Visual Studio Package Manager or Console.
193193

194194
<a name="migrate-to-automatic-package-restore-visual-studio"></a>
195195
## Migrate to automatic package restore

docs/consume-packages/managing-the-global-packages-and-cache-folders.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Whenever you install, update, or restore a package, NuGet manages packages and p
2323
2424
By using the cache and *global-packages* folders, NuGet generally avoids downloading packages that already exist on the computer, improving the performance of install, update, and restore operations. When using PackageReference, the *global-packages* folder also avoids keeping downloaded packages inside project folders, where they might be inadvertently added to source control, and reduces NuGet's overall impact on computer storage.
2525

26-
When asked to retrieve a package, NuGet first looks in the *global-packages* folder. If the exact version of package is not there, then NuGet checks all non-HTTP package sources. If the package is still not found, NuGet looks for the package in the *http-cache* unless you specify `--no-cache` with `dotnet.exe` commands or `-NoCache` with `nuget.exe` commands. If the package is not in the cache, or the cache isn't used, NuGet then retrieves the package over HTTP .
26+
When asked to retrieve a package, NuGet first looks in the *global-packages* folder. If the exact version of package is not there, then NuGet checks all non-HTTP package sources. If the package is still not found, NuGet looks for the package in the *http-cache* unless you specify `--no-http-cache` with `dotnet.exe` commands or `-NoHttpCache` with `nuget.exe` commands. If the package is not in the cache, or the cache isn't used, NuGet then retrieves the package over HTTP .
2727

2828
For more information, see [What happens when a package is installed?](../concepts/package-installation-process.md).
2929

docs/reference/cli-reference/cli-ref-install.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ where `<packageID>` names the package to install (using the latest version), or
7070

7171
Displays help information for the command.
7272

73-
- **`-NoCache`**
73+
- **`-NoHttpCache`**
7474

75-
Prevents NuGet from using cached packages. See [Managing the global packages and cache folders](../../consume-packages/managing-the-global-packages-and-cache-folders.md).
75+
Prevents NuGet from using http cached packages. See [Managing the global packages and cache folders](../../consume-packages/managing-the-global-packages-and-cache-folders.md).
7676

7777
- **`-NonInteractive`**
7878

docs/reference/cli-reference/cli-ref-mirror.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ If your target repository is on `https://machine/repo` that's running [NuGet.Ser
3838

3939
Displays help information for the command.
4040

41-
- **`-NoCache`**
41+
- **`-NoHttpCache`**
4242

43-
Prevents NuGet from using cached packages. See [Managing the global packages and cache folders](../../consume-packages/managing-the-global-packages-and-cache-folders.md).
43+
Prevents NuGet from using http cached packages. See [Managing the global packages and cache folders](../../consume-packages/managing-the-global-packages-and-cache-folders.md).
4444

4545
- **`-Noop`**
4646

@@ -67,7 +67,7 @@ Also see [Environment variables](cli-ref-environment-variables.md)
6767
## Examples
6868

6969
```cli
70-
nuget mirror packages.config https://MyRepo/nuget https://MyRepo/api/v2/package -source https://nuget.org/api/v2 -apikey myApiKey -nocache
70+
nuget mirror packages.config https://MyRepo/nuget https://MyRepo/api/v2/package -source https://nuget.org/api/v2 -apikey myApiKey -nohttpcache
7171
7272
nuget mirror Microsoft.AspNet.Mvc https://MyRepo/nuget https://MyRepo/api/v2/package -version 4.0.20505.0
7373

docs/reference/cli-reference/cli-ref-restore.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ where `<projectPath>` specifies the location of a solution or a `packages.config
7373

7474
*(3.2+)* Specifies the version of MSBuild to be used with this command. Supported values are 4, 12, 14, 15.1, 15.3, 15.4, 15.5, 15.6, 15.7, 15.8, 15.9. By default the MSBuild in your path is picked, otherwise it defaults to the highest installed version of MSBuild.
7575

76-
- **`-NoCache`**
76+
- **`-NoHttpCache`**
7777

78-
Prevents NuGet from using cached packages. See [Managing the global packages and cache folders](../../consume-packages/managing-the-global-packages-and-cache-folders.md).
78+
Prevents NuGet from using http cached packages. See [Managing the global packages and cache folders](../../consume-packages/managing-the-global-packages-and-cache-folders.md).
7979

8080
- **`-NonInteractive`**
8181

docs/reference/msbuild-targets.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ Additional restore settings may come from MSBuild properties in the project file
426426
| `RestorePackagesPath` | User packages folder path. |
427427
| `RestoreDisableParallel` | Limit downloads to one at a time. |
428428
| `RestoreConfigFile` | Path to a `Nuget.Config` file to apply. |
429-
| `RestoreNoCache` | If true, avoids using cached packages. See [Managing the global packages and cache folders](../consume-packages/managing-the-global-packages-and-cache-folders.md). |
429+
| `RestoreNoHttpCache` | If true, avoids using http cached packages. See [Managing the global packages and cache folders](../consume-packages/managing-the-global-packages-and-cache-folders.md). |
430430
| `RestoreIgnoreFailedSources` | If true, ignores failing or missing package sources. |
431431
| `RestoreFallbackFolders` | Fallback folders, used in the same way the user packages folder is used. |
432432
| `RestoreAdditionalProjectSources` | Additional sources to use during restore. |

0 commit comments

Comments
 (0)