U4-7823 - stop flooding the log with errors getting media 0

This commit is contained in:
Stephan
2016-02-26 11:35:24 +01:00
parent f78cb8a970
commit 0d191fb8bd

View File

@@ -182,6 +182,8 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
// it is called, but at least it should NOT hit the database
// nor Lucene each time, relying on the memory cache instead
if (id <= 0) return null; // fail fast
var cacheValues = GetCacheValues(id, GetUmbracoMediaCacheValues);
return cacheValues == null ? null : CreateFromCacheValues(cacheValues);