plu/Pithub — pull request #164 by schwern (2014-11-01 00:30:00+00:00)
Title: Support conditional requests (caching)

This implements Github conditional requests aka caching via HTTP ETags. It's a minimalist patch without a lot of bells and whistles.

* Cache::LRU was chosen for its simplicity and lack of dependencies.
* The cache size is per request, not by response size.
* There's no easy way to change the cache size.
* There's no way to turn off the cache.

The only tests are live tests. I didn't feel entirely comfortable trying to make tests with the mocked responses.

See https://en.wikipedia.org/wiki/HTTP_ETag and https://developer.github.com/v3/#conditional-requests

For #162