MServiceReEnterable

MServiceReEnterable ⇐ Trait

Trait to add re-enterable feature to async functions that may take time and be called several times in a row

Kind: global mixin
Extends: Trait

_makePersistantReEnterableCall(call, callId, [options]) ⇒ Promise

Allows to make an async call with result stored and mutualised between all same calls

Kind: static method of MServiceReEnterable
Returns: Promise - The mutualised promise of the call
Access: protected

ParamTypeDefaultDescription
callfunction

Async call to mutualise

callIdstring

If of the call to retrieve/store in cache

[options]object
[options.force]numberfalse

Allows to force cache renewal

_makeVolatileReEnterableCall(call, callId, [options]) ⇒ Promise

Allows to make an async call with result stored and mutualised between all same calls. Cache call is reset when the pending call has ended.

Kind: static method of MServiceReEnterable
Returns: Promise - The mutualised promise of the call
Access: protected

ParamTypeDefaultDescription
callfunction

Async call to mutualise

callIdstring

If of the call to retrieve/store in cache

[options]object
[options.force]numberfalse

Allows to force cache renewal