'Wrapper around builder\'s get_items that caches the rendering.'

def get_items(self, *a, **kw):

    from r2.lib.template_helpers import replace_render
    builder_items = self.builder.get_items(*a, **kw)
    for item in self.builder.item_iter(builder_items):
        if ((c.render_style != 'api') and (not hasattr(item, 'render_replaced'))):
            item.render = replace_render(self, item, item.render)
            item.render_replaced = True
    return builder_items
