polarity-integration-utils
    Preparing search index...

    Interface IntegrationCache

    Integration-scoped cache operations - shared across all users of a specific integration Use for API responses, configuration, or data that's the same for all users

    interface IntegrationCache {
        delete(key: string): Promise<void>;
        get(key: string): Promise<unknown>;
        set(key: string, value: unknown, options?: CacheOptions): Promise<void>;
    }
    Index

    Methods

    Methods

    • Delete a value from integration cache

      Parameters

      • key: string

        The cache key to delete

      Returns Promise<void>

      Promise that resolves when the operation completes

      await cache.integration.delete('expired_config');
      
    • Get a value from integration cache

      Parameters

      • key: string

        The cache key

      Returns Promise<unknown>

      Promise that resolves to the cached value or null if not found

      const config = await cache.integration.get('api_config');
      
    • Set a value in integration cache

      Parameters

      • key: string

        The cache key

      • value: unknown

        The value to cache (must be JSON serializable)

      • Optionaloptions: CacheOptions

        Cache options including TTL

      Returns Promise<void>

      Promise that resolves when the operation completes

      await cache.integration.set('lookup_ip_1.1.1.1', result, { ttl: 300 });