Adding a local thread registry to store local caches.