-
-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Labels
Description
just a suggestion that might be added to the documentation.
i'm using render async with this pattern: i'm rendering the existing partials by adding paths and methods that just render the existing partials, while making use of the existing request caching mechanisms. the key advantage is that it's not taking cache memory on the server but it's using the client side (or in between) HTTP caches. for full correctness, fragment caching is complimentary in the general case, but in general the HTTP caching should not be forgotten and can bring extra 'relief' for the server.
def _details
authorize @node, :show?
if (stale?(@node)) # makes the browser cache subsequent requests
readonly = (current_user == nil) || (current_user.can_write? == false)
render partial: 'details', locals: {node: @node, node_structure: @node_structure, readonly: readonly}
end
end
Reactions are currently unavailable