refactored updateSlugs to use cache information