Add type hints to the caching module.