NuGet/Home

A better cache clean-up and expiration policy

Open

#4,980 创建于 2017年4月5日

在 GitHub 查看
 (43 评论) (59 反应) (0 负责人)HTML (292 fork)batch import
Area:HttpCachingCategory:Quality WeekPriority:2Type:Featurehelp wanted

仓库指标

Star
 (1,459 star)
PR 合并指标
 (平均合并 464天 23小时) (30 天内合并 1 个 PR)

描述

edit by @zivkan: a first step has been implemented, allowing package "last used in restore" date to be updated: https://github.com/NuGet/NuGet.Client/pull/4222

edit by NuGet Client Triage:

  • Restore driven - A minimally impactful approach might be to run a "gc" periodically, like say once a week or once a month.
  • Additional command - Community projects like NuGet Cleaner combine with updatePackageLastAccessTime

original post below:


The user local NuGet cache has a tendency to grow unconditionally. Which results in funny tweets like this from @davidfowl:

David Fowler‏ @davidfowl 9m How big is your nuget cache? Mine is 14 gigs #nuget image

Can we track when an item was last hit by package restore and apply some expiration policy? I don't have good data, but I bet a good chunk of the bloat aren't individual packages with a single version but a small number of packages with many versions. If were to just delete older versions that weren't needed for restore for a while, we're probably getting to something saner.

Thoughts?

贡献者指南