public string GetImageUrl(string imageUrl, Size targetSize) { var info = _mediaSettings.GetImageUrlCachingInfo(imageUrl, targetSize); return(_cacheManager.Get(info.CacheKey, () => string.IsNullOrWhiteSpace(imageUrl) ? null : GetImageInfo(imageUrl, targetSize)?.ImageUrl, info.TimeToCache, info.ExpiryType)); }