Colin Dellow
unread,Apr 11, 2012, 10:07:25 AM4/11/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Lift
I need to do an expensive operation (a DB request, a file system
check), potentially N times. I'd like to batch up the requests so I
only pay the network latency cost once. This works if only a single
massive snippet is reponsible for all the requests, but not so well if
multiple snippets contribute to the final document, all of which may
need to do the operation.
Is there a way to defer snippet evaluation until the last minute,
where a method has access to the entire output and can batch things
up?
The approach I'm currently thinking of is to emit something like
<makeLink id="baz"/>, hook into LiftRules.convertResponse and do a
transformation there, which feels a bit dirty.