Lightened code for caching