clojars / clojars-web

A community repository for open-source Clojure libraries
https://clojars.org
Eclipse Public License 1.0
470 stars 114 forks source link

CDN caches 404s, which can cause new deploys to not be visible for 24 hours #746

Closed tobias closed 4 years ago

tobias commented 4 years ago

The CDN caches for 24 hours, and will cache 404s. If an artifact version is requested before it has been deployed to the S3 repo, it's absence will be cached at any edge nodes that received requests for it even after it has been deployed.

One potential fix would be to have Clojars purge any artifacts from a deploy from the cache as the last step of the deploy.

tobias commented 4 years ago

It might be enough to just remove this when conditional: https://github.com/clojars/clojars-web/blob/master/src/clojars/storage.clj#L105, though that would add additional time to the deploy, which may lead to timeouts of the client. An alternative may be to perform this purges in a future.

tobias commented 4 years ago

A fix for this has been deployed as part of Clojars 102.