Added config and cache lookup to context

Signed-off-by: Tom Wright <tom@inflatablecookie.com>