Internal API / Function

bufferIndexes

This is an internal function that is used by the Effects to buffer the loadByIndexes actions coming into an effect so that we can dispatch indexes independently but send all the indexes to the server in a single request.

NOTE: bufferAction assumes an array of indexes is passed to the action it is buffering.

Presentation

function bufferIndexes(
  bufferTimeMs: number = 0,
): (source: Observable<IndexProp>) => Observable<IndexesProp>;

Returns

(source: Observable<IndexProp>) => Observable<IndexesProp> -

The buffered indexes.

Parameters

NameTypeDescription
bufferTimeMs
number

The time to buffer the ids before sending them to the server. The default is 1ms which only allow the buffer to last until the thread frees up and is probably all we will ever need.