fcoury / octopi

A Ruby interface to GitHub API v2
http://hasmany.info/2009/4/18/ruby-interface-to-github-api
MIT License
216 stars 47 forks source link

Cache API Responses #4

Closed runpaint closed 15 years ago

runpaint commented 15 years ago

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.

runpaint commented 15 years ago

https://gist.github.com/98030/4374b7a669e59703601675382a37512de453f87c looks hopeful.

radar commented 15 years ago

This also looks helpful: http://github.com/newbamboo/api_cache/tree/master

radar commented 15 years ago

Using APICache to do this, my fork anyway.