Skip to content

Collapsing

Alex edited this page Jan 29, 2021 · 1 revision

Disabled by default

Collapsing of requests is the same as 'Debouncing'.
Simply, only make a single call to a dependency within a given timeframe,
if multiple calls are being made.

Note: Commands that enable this should be stateless, as only the first request will go through. Subsequent requests will use the results of the first one.

Configuration - defaults

CommandConfiguration.CreateConfiguration(
config => 
{
    config.CollapserSettings = new CollapserSettings 
    { 
        IsEnabled = false,
        Window = Timespan.FromMilliseconds(100),
     }
});
Clone this wiki locally