rails-api/active_model_serializers — pull request #352 by sorentwo (2013-07-11 11:20:39+00:00)
Title: Perforated array caching

Rather than caching the array as a solid entity this leverages the cache's `fetch_multi` method to construct array json from the underlying objects in a cached array. Using this method any existing object caches can be used to when constructing the cached array, and individual entities will be cached for later usage.

There are a couple of cases and improvements that still need to be made before this would be ready to go, but I wanted to open it up for discussion. This is something I've used internally for about a year now (as a custom wrapper) and would really like to see it available for wider usage.

Features that are still missing (or don't have a test case exposing the errors):

* It relies on the objects already being serializers, of course that is never the case
* ArrayCaching#serialize needs a real implementation