Better caching for entire script