Add a massively over-engineered caching system. If an item was requested within x seconds, we'll reuse it. Otherwise recompute it.
Using this system, provide a mechanism for making cached HTTP requests. As well as the above TTL, we also use the ETag system to avoid receiving massive responses.
We use the above to fetch the CC:T method index at most every 60 seconds.
This does introduce a small latency, but doesn't appear to more than 0.2-0.5s on my terrible WiFi, so should be much faster when running on your server.
We may wish to extend or shorten this delay later on - it means method changes should be picked up fairly quickly, though I realise they don't change /that/ often.
Add a massively over-engineered caching system. If an item was requested within x seconds, we'll reuse it. Otherwise recompute it.
Using this system, provide a mechanism for making cached HTTP requests. As well as the above TTL, we also use the ETag system to avoid receiving massive responses.
We use the above to fetch the CC:T method index at most every 60 seconds.
This does introduce a small latency, but doesn't appear to more than 0.2-0.5s on my terrible WiFi, so should be much faster when running on your server.
We may wish to extend or shorten this delay later on - it means method changes should be picked up fairly quickly, though I realise they don't change /that/ often.