twodayslate / swift-package-registry

A Swift Package Registry
https://swiftpkg.dev
ISC License
26 stars 6 forks source link

Use conditional requests #13

Open twodayslate opened 4 years ago

twodayslate commented 4 years ago

When communicating with the GitHub team they recommended using conditional requests when parsing packages. This would help with any API rate limiting issues.

Currently whenever a package is viewed that is an API request.

https://github.com/twodayslate/swift-package-registry/blob/74a380cc9e93d93fc7d76a89ab79fd4b1f3453b4/lib/package.js#L15

Instead it should be a database lookup, if the conditional request does not say there is an update.

twodayslate commented 3 years ago

If there is an update should parse the new package. tightly coupled with #19