globe icon indicating copy to clipboard operation
globe copied to clipboard

Implement caching mechanism

Open kloesing opened this issue 11 years ago • 0 comments

Moving this idea here from the [email protected] thread.

In the long run it would be useful to cache Onionoo results on the server running Globe in node.js. Though I'd say don't prioritize this right now.

However, when you get to this, I suggest implementing a slightly different caching algorithm for the node.js version of Globe than for the client-side Globe. The server-side Globe could download the full details and bandwidth documents once per hour and cache it on the server. In particular, it could attempt to download it more often and include an If-Modified-Since header in its request, and it'll only get an update once per hour. I guess this requires some concurrency magic on the server side to avoid multiple downloads in parallel.

But as I said above: this is a fine future work task! For now, it's fine to make new requests to Onionoo.

kloesing avatar Feb 03 '14 08:02 kloesing