metamx/druid — pull request #279 by himadrisingh001 (2013-10-28 06:25:57+00:00)
Title: Bard Results Cache implementation

Caching Client is used for query results from druid server so its hard to use same for Bard Results Cache, so implemented a new caching client ResultsCachingClient to cache the merged results.

1. Cache keys include the segment identifier and version. Is this enough to make sure that if segments are removed/updated then keys will be different?
2. A different cache is used for results cache which should emit stats for bard result cache hits/misses.
3. The client is lifecycle managed and also registers for Segment Call back.

Pull request for 0.5.x version for now. Will make the changes for 0.6 once implementation is reviewed and agreed upon.