private DefinitionsFields GetAllDefinitionsFields(bool isLive, int?definitionId) { string cacheKey = "AllDefinitionsFields" + isLive + definitionId; return(_cacheProvider.GetOrAdd( cacheKey, new[] { _prodDefContentId.ToString() }, TimeSpan.FromHours(3), () => GetDefinitionsFields(_contentDefinitionService.GetDefinitions(isLive).Where(x => !definitionId.HasValue || x.ContentId == definitionId)))); }