Scalatra cache

Re-opening with updated code. Many thanks to @rossabaker and @casualjim for holding my hand thru this!