简体   繁体   中英

How nuget install decides when to download a new version of a package?

My scenario is this:

  1. Use nuget install without version to get the latest version of a package
  2. Publish a new version of the package
  3. Check with nuget list that the new version is indeed published
  4. Run nuget install again.

What I noticed is that nuget install does not fetch the new version right away. It takes about an hour to see it.

So how does it work exactly?

Nuget caches all made requests in the http-cache (see "nuget locals" in the docs for reference). Objects (aka queries and their result) in this cache have an expiration of about 30minutes to 1 hour depending on the version of nuget.exe.

Use nuget locals http-cache -clear to clear this cache, then nuget should fetch the new versions without having to wait

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM