Extract load from cache into a separate function