/// <summary> /// Gets or creates value according default cache behavior <see cref="CacheSettings{TValue}.Default"/>. /// </summary> /// <typeparam name="TValue">Value type.</typeparam> /// <param name="sectionName">Section name.</param> /// <param name="key">Cache key.</param> /// <param name="factory">Factory method to create and customize cache item.</param> /// <returns><see cref="CacheResult{TValue}"/>.</returns> public async Task <CacheResult <TValue> > GetOrCreateAsync <TValue>(string sectionName, string key, Func <ICacheEntryContext, Task <TValue> > factory) { ICacheSection <TValue> cacheSection = GetOrCreateSection(sectionName, CacheSettings <TValue> .Default); return(await cacheSection.GetOrCreateAsync(key, factory)); }