Type Alias XiorThrottleOptions

XiorThrottleOptions: {
    enableThrottle?: boolean | ((config?: XiorRequestConfig) => boolean);
    onThrottle?: ((config: XiorRequestConfig) => void);
    threshold?: number;
    throttleCache?: ICacheLike<RecordedCache>;
    throttleItems?: number;
}

Type declaration

  • OptionalenableThrottle?: boolean | ((config?: XiorRequestConfig) => boolean)

    check if we need enable throttle, default only GET method orisGet: true enable

  • OptionalonThrottle?: ((config: XiorRequestConfig) => void)
  • Optionalthreshold?: number

    threshold in milliseconds, default: 1000ms

  • OptionalthrottleCache?: ICacheLike<RecordedCache>
  • OptionalthrottleItems?: number

    max throttle numbers in LRU, default is 100