Rebuild media cache, TypedMedia not return all files
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();
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.
Rebuild media cache, TypedMedia not return all files
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:
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...