Hi, I am a contributor to Thredded, a Rails forums engine, and we have an interesting problem.
We currently all cache the posts on a topic page using collection caching.
This requires the entire post to be cached due to the current collection caching interface,
even though only the post content itself is slow to render. That’s was not a large problem for us until now.
However, @EllaNancyFay is currently working on a feature for Thredded that requires something that cannot be cached
to be inserted at the end of the post partial, but that’s not possible via the current render collection: …, cache: … interface.
I’m wondering if a feature that lets us render a collection to Strings would belong in Rails core?
So a method such as render_to_string**s**(partial:, collection:, cache:),
returning an Array of [ [item, "rendered html"], ... ]
.