Skip to content
Compare
Choose a tag to compare
@MagicBella MagicBella released this 28 Mar 10:42
· 37 commits to main since this release
a2b097a

Minor Changes

  • #482 a826a43 Thanks @smeijer! - We now dedupe identical requests that are made within the same second.

  • #487 e3cd22e Thanks @smeijer! - Network requests are now deduped. You can control this behavior using the
    cacheTTL setting. Set it to 0 to disable. The TTL defaults to one second.
    Meaning any identical request within that second shares the same Promise and
    thus outcome.

    import { UserClient } from 'magicbell/user-client';
    
    const magicbell = new UserClient({
      apiKey: 'your-api-key',
      userEmail: '[email protected]',
      cacheTTL: 1_000,
    });