cache-photos: cleanup/refactor