Re:Visual Studio Code 1.7 overloaded npmjs.org, release reve...
by awinder on Thursday November 03, 2016 @10:32AM
(#12864201)
Most CDN's are able to invalidate a cache entry, so caching a 404 and busting it when it's not going to be a 404 anymore seems like it'd work?
[ Parent
| on HN ]
Re:Visual Studio Code 1.7 overloaded npmjs.org, release reve...
by ceejbot on Thursday November 03, 2016 @01:27PM
(#12866013)
Yeah, you're right. It was a simple oversight that we hadn't been caching 404s already, since we already have infrastructure in place to bust cache on publishes. It would have been our next step if necessary (it wasn't necessary to mitigate this flood).
You optimize for the use patterns you anticipate or see in normal usage, because, well, see famous saying about premature optimization. The use pattern we see most often is people installing from pre-determined lists in package.json, so 404s aren't all that common ordinarily.