Revert "Drop locking cache -- not helping."

This reverts commit e8aa5f28cb069041137363a68b342deb692b6f56.
Sweep refactor of context and how locking cache is used.