Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have been importing media items into Umbraco using C# and to improve the performance of the import I temporarily changed the following in the "umbracoSettings.config": <ContinouslyUpdateXmlDiskCache>False</ContinouslyUpdateXmlDiskCache>
I have since changed it back to "true" but I cannot seem to return any of the new files I imported using the API, this includes new files I manually add. If I run the following code it will only return the files that were added to the media section before the import:
var test1 = UmbracoHelper.TypedMediaAtRoot().DescendantsOrSelf("File").ToList();
I have tried running this:
And going here and rebuilding the cache:
But nothing seems to work. Please can someone help :-(
Media is not stored in the XML cache. It's stored in the Examine index. Go to the developer section and rebuild your internal and external indexes:
Though, the Umbraco core is supposed to revert to a database query if it can't find the media in the Examine index, so not sure what the issue might be exactly.
Thank you, you are a life saver! I didn't mention that I also disabled Examine during the import to speed things up but I didn't think this was relevant because I thought TypedMedia would be using the XML cache the same as TypedContent. I rebuilt the Internal Index and it is now finding all the new media items.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted