ApiChangeDetectionConfig
interface ApiChangeDetectionConfig {
blacklist?: SpeedKitRule[];
compare?: CompareFunction;
compareKeys?: KeyCompareFunctions;
onChange?: (urls: string[]) => void;
sampleRate?: number;
timeout?: number;
}
blacklist?: SpeedKitRule[];
compare?: CompareFunction;
compareKeys?: KeyCompareFunctions;
onChange?: (urls: string[]) => void;
sampleRate?: number;
timeout?: number;
}
Index
Properties
Properties
Optionalblacklist
Excludes URLs from the API CD.
Defaults to [].
Optionalcompare
Can set a custom function to compare the cached with the remote API response.
Optionalcompare Keys
Can set custom compare functions on individual keys of an API response. All other keys will be computed be the default compare function.
Optionalon Change
onChange?: (urls: string[]) => void
Gets called every time we detect an API change.
Optionalsample Rate
sampleRate?: number
Will set a percentage in which the API CD will execute.
Defaults to 1.
Optionaltimeout
timeout?: number
How long to wait in milliseconds until starting the API CD after detecting a matching request. Defaults to 1000ms.
The configuration for the API Change Detection. Setting the config to
truewill use default values.