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
- MServiceReEnterable ⇐
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
| Param | Type | Default | Description |
|---|---|---|---|
| call | function | Async call to mutualise | |
| callId | string | If of the call to retrieve/store in cache | |
| [options] | object | ||
| [options.force] | number | false | 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
| Param | Type | Default | Description |
|---|---|---|---|
| call | function | Async call to mutualise | |
| callId | string | If of the call to retrieve/store in cache | |
| [options] | object | ||
| [options.force] | number | false | Allows to force cache renewal |