Re: [Rails-core] Collection caching: render to strings

2017-03-21 Thread Gleb Mazovetskiy
If you mean whether cache_collection_render is usable, I think it would be but it is currently private! The implementation I've linked to above does use PartialRenderer, and effectively reimplements cache_collection_render using only public APIs. On Tue, Mar 21, 2017 at 6:45 PM Kasper Timm

Re: [Rails-core] Collection caching: render to strings

2017-03-21 Thread Kasper Timm Hansen
Right, it’s joined with the spacer template. Maybe that’s usable? https://github.com/rails/rails/blob/9c0a82d5766c2c01f1e75eb5c70c65f28ec6a665/actionview/lib/action_view/renderer/partial_renderer.rb#L326

Re: [Rails-core] Collection caching: render to strings

2017-03-20 Thread Gleb Mazovetskiy
No, a collection cache render returns a single string. On Mon, 20 Mar 2017, 19:15 Kasper Timm Hansen, wrote: > Been a while since I’ve last worked with that code but doesn’t a > collection cache render return a collection of rendered HTML strings? > > I think you might be able

[Rails-core] Collection caching: render to strings

2017-03-01 Thread Gleb Mazovetskiy
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