We recently restructured our media folder, moving and renaming files within it. For the most part, everything is working correctly, but when we generate a url using Url.ContentUrl() the urls that we get seem to be built using the old file names and locations for segments, rather than the most up to date ones.
I am assuming the urls are being cached somewhere after they are generated the first time, but it seems they persist far longer than I would have expected. Is there a way to get the urls generated via Url.ContentUrl() to regenerate using the current file an folder names for the url segments?
It is fine if the old urls still work, I just want all urls we generate going forward to reflect the new file structure.
Try changing the url segment on file. Just renaming won't change url segment. There is a small SEO hit for this so try not to do it too often or set up 301s when you do. You can change the url segment in edit mode (or programmatically)