Improved location caching.