Currently the code retrieves results, caches that, and then formats and returns. This means even if the results are in the cache, we go through a formatting step.
As an optimization, especially in batch ops, we should retrieve -> format -> cache, so that formatting isn't happening unnecessarily on cached details.
(The async code in #32 will already do this, so this fix is mostly for the synchronous code).
Currently the code retrieves results, caches that, and then formats and returns. This means even if the results are in the cache, we go through a formatting step.
As an optimization, especially in batch ops, we should retrieve -> format -> cache, so that formatting isn't happening unnecessarily on cached details.
(The async code in #32 will already do this, so this fix is mostly for the synchronous code).