Populate handler cache which seem to be missing.

I was looking at performance issue, and while reading that code it seemed like we were missing populating the cache, so submitting a pull request.