/// <summary> /// Returns pipeline wrapper that caches processors for the specified <paramref name="hours"/>. /// The period starts at the moment you request processors from <paramref name="pipeline"/> /// and updates on next processors request when period is over. /// </summary> /// <param name="pipeline"> /// The pipeline which processors should be cached in memory. /// </param> /// <param name="hours"> /// The period in hours that defines how long processors will be cached. /// </param> /// <param name="useLazyLoading"> /// Defines whether processors should be cached after /// first request (true) or if processors should be /// cached during the call of this method (false). /// </param> /// <returns> /// Returns pipeline wrapper that caches processors for the specified <paramref name="hours"/>. /// </returns> public static IPipeline FixForHours(this IPipeline pipeline, int hours, bool useLazyLoading = true) { return(pipeline.FixFor(TimeSpan.FromHours(hours), useLazyLoading)); }
/// <summary> /// Returns pipeline wrapper that caches processors for the specified <paramref name="minutes"/>. /// The period starts at the moment you request processors from <paramref name="pipeline"/> /// and updates on next processors request when period is over. /// </summary> /// <param name="pipeline"> /// The pipeline which processors should be cached in memory. /// </param> /// <param name="minutes"> /// The period in minutes that defines how long processors will be cached. /// </param> /// <param name="useLazyLoading"> /// Defines whether processors should be cached after /// first request (true) or if processors should be /// cached during the call of this method (false). /// </param> /// <returns> /// Returns pipeline wrapper that caches processors for the specified <paramref name="minutes"/>. /// </returns> public static IPipeline FixForMinutes(this IPipeline pipeline, int minutes, bool useLazyLoading = true) { return(pipeline.FixFor(TimeSpan.FromMinutes(minutes), useLazyLoading)); }