stackmob/newman — pull request #64 by arschles (2013-09-14 00:28:59+00:00)
Title: doing caching asynchronously

never merged https://github.com/stackmob/newman/pull/59 and closed it prematurely, so reopening it here

This PR fixes a thundering herd on the backend of an `HttpResponseCacher`.

Previously, cache implementations such as `InMemoryHttpResponseCacher` could not return until there was an `HttpResponse` ready, which means they blocked on the result of the backend call in order to do the cache fill. With that scheme, multiple unnecessary requests can come in for the same resource during the cache filling window.

This change adopts the [strategy that spray-caching uses](http://spray.io/documentation/1.2-M8/spray-caching/) by storing `Future[HttpResponse]`s as cache values