/// <summary> /// Use the previous cached value (or a default value if there is no previous value) if the retrieval mechanism failed /// </summary> public static CacheStrategyAsync <T> IfRetrievalFailsUsePreviousValueOrDefault <T>(this CacheStrategyAsync <T> source, T defaultValue) { return(source.IfRetrievalFails((ex, cachedValue) => RetrievalErrorHandlerResult <T> .UsePreviousCachedValueOrDefault(ex, cachedValue, defaultValue))); }
/// <summary> /// Use the previous cached value if the retrieval mechanism failed /// </summary> public static CacheStrategyAsync <T> IfRetrievalFailsUsePreviousValue <T>(this CacheStrategyAsync <T> source) { return(source.IfRetrievalFails(RetrievalErrorHandlerResult <T> .UsePreviousCachedValue)); }