private static Func <TKey, TValue> GetAnother <TKey, TValue>(this ICachingMethod <TKey, TValue> cm, Func <TKey, TValue> func) => (k) => cm.GetOrStore(k, () => func(k));
/// <summary>Add a type of cacher to the CachingBuilder.</summary> /// <typeparam name="TKey">The type of the key.</typeparam> /// <typeparam name="TValue">The type of the value.</typeparam> /// <param name="cm">The caching builder.</param> /// <param name="cachingMethod">The caching method.</param> /// <returns></returns> /// <autogeneratedoc /> public static CachingBuilder <TKey, TValue> AddCacher <TKey, TValue>(this CachingBuilder <TKey, TValue> cm, ICachingMethod <TKey, TValue> cachingMethod) { cm._cachingMethods.Add(cachingMethod); return(cm); }