Scalatra cache

Opening as a PR to get some eyes for code review. Safe to merge if it's ok, but there will be follow-on code for memoizing functions and wrapping in futures.