We should be caching the response from GitHub. The implementation for this depends on:
How we integrate caching into HTTParty, if not there already.
Whether GitHub returns useful caching metadata, and if not will it?
The logic would have to realise that the format of the data is irrelevant, i.e. if we already have a resource in YAML and the user has requested XML, we hit the cache and reformat the data locally.
In the absence of useful caching metadata, we'd need to hard-code assumptions. For instance the raw blob of a specific commit of a specific file would never change, so a sucessful response could be cached indefinitely.
We should be caching the response from GitHub. The implementation for this depends on:
The logic would have to realise that the format of the data is irrelevant, i.e. if we already have a resource in YAML and the user has requested XML, we hit the cache and reformat the data locally.
In the absence of useful caching metadata, we'd need to hard-code assumptions. For instance the raw blob of a specific commit of a specific file would never change, so a sucessful response could be cached indefinitely.