Conversation
|
Though, thinking about it, if we can cache or not probably depends on the use-case? |
|
Not sure it's a good idea to cache a build-status indeed. ^^' |
| "doc_status": rustdoc_status, | ||
| })); | ||
| let mut response = Json(serde_json::json!({ | ||
| "version": matched_release.release.version, |
My thought here is: And that takes ~250ms globally in fastly's network. So for the currently known use-cases, that's totally fine, since we don't need in-progres status. I probably should think through some of the in-progress responses for this, but my hunch is that it's fine, assuming the invalidation. high level, after the build is finished, the status only rarely changes, which makes it a good candidate for caching. And prefer the CDN responding in these cases over having to run more webservers ( and databases ) over time. |
Seeing some current request stats (~60 rps in peaks), I thought about this again.
Main users are:
I believe we can cache this the same way we cache docs, release lists, details etc.
( also i created a PR to crates.io for an optimization rust-lang/crates.io#13174 )