DRYing cache and data loading