Replace request_cache with a thread-local variable.