Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Backend: cache events and contributor listings #1051
Conversation
saivann
commented on an outdated diff
Sep 7, 2015
| @@ -106,9 +106,42 @@ def site_payload | ||
| return | ||
| end | ||
| - # Populate site.corecontributors and site.sitecontributors arrays | ||
| - site.corecontributors = contributors('bitcoin/bitcoin',site.config['aliases']) | ||
| - site.sitecontributors = contributors('bitcoin-dot-org/bitcoin.org',site.config['aliases']) | ||
| + ## Create cache directory if it doesn't exist | ||
| + system 'mkdir', '-p', '_cache' |
saivann
Contributor
|
|
That solution is also elegant in that it prevents repeated API calls by default when testing! And probably improve performances quite a bit at the same time. Thanks, LGTM |
|
@saivann amended commit to use the Ruby mkdir (didn't know about that, thanks!). Thanks for reviewing! In the absence of critical feedback, this will be merged on Wednesday. |
harding commentedSep 6, 2015
When making changes to the site, Saïvann and I often diff the resulting HTML output with output from earlier known-good commits. One problem with this method is that the HTML output isn't fully deterministic---some of it comes from external sites and can change massively between two builds that are only minutes apart, making reading the diff unpleasant and less useful than it could be.
This commit caches that external data between builds so that two builds on the same computer are very nearly deterministic. As evidence, at the end of this message I offer inline the full diff of two sequential builds both on this commit.
Cached Meetup.com events, Bitcoin Core contributor listings, and Bitcoin.org contributor listings are retained for 24 hours before being refreshed. Cached Geo-location data for conferences is retained until the _events.yml file is updated. Caches are updated based on file timestamps, so they can be manipulated using
touchor simply deleted to fetch new data.This commit includes one small miscellaneous change to the Makefile to reduce the size of the /commit.txt file. (The replaced command didn't work the way I thought it did; this command produces the correct output.)