API Reference
PlumaSnapshotCache
| Member | Signature | Description |
|---|---|---|
PlumaSnapshotCache.create | (options: PlumaSnapshotCacheOptions) => PlumaSnapshotCache | Creates a new cache instance. |
cache.evaluator | (options?: EvaluatorOptions) => Promise<Evaluator> | Returns an evaluator for the current snapshot. Refreshes if the TTL has expired. |
PlumaSnapshotCacheOptions
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
baseUrl | string | yes | (none) | Base URL of the Pluma API server |
token | string | yes | (none) | SDK token from Organisation → API Keys |
ttlMs | number | no | 30000 | Snapshot cache TTL in milliseconds |
EvaluatorOptions
| Field | Type | Required | Description |
|---|---|---|---|
subjectKey | string | no | User ID or numeric-based identifier matched against allow/deny lists |
Evaluator
| Member | Signature | Description |
|---|---|---|
isEnabled | (flagKey: string) => boolean | Evaluates the flag for the configured subject. |
Last updated on