Simplified the caching process to further improve performance