Skip to content

Commit

Permalink
Expand cache option to akamai-base
Browse files Browse the repository at this point in the history
  • Loading branch information
keelerm84 committed Jan 27, 2025
1 parent 25c7173 commit da8caea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
14 changes: 1 addition & 13 deletions packages/sdk/akamai-edgekv/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,11 @@
*
* @packageDocumentation
*/
import {
init as initEdge,
LDClient,
LDOptions as LDCommonAkamaiOptions,
} from '@launchdarkly/akamai-edgeworker-sdk-common';
import { init as initEdge, LDClient, LDOptions } from '@launchdarkly/akamai-edgeworker-sdk-common';
import { BasicLogger } from '@launchdarkly/js-server-sdk-common';

import EdgeKVProvider from './edgekv/edgeKVProvider';

export type LDOptions = LDCommonAkamaiOptions & {
/**
* The time-to-live for the cache in milliseconds. The default is 100ms. A
* value of 0 will cache indefinitely.
*/
cacheTtlMs?: number;
};

export * from '@launchdarkly/akamai-edgeworker-sdk-common';

export type AkamaiLDClientParams = {
Expand Down
8 changes: 7 additions & 1 deletion packages/shared/akamai-edgeworker-sdk/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@ import { validateOptions } from './utils';
* supported. sendEvents is unsupported and is only included as a beta
* preview.
*/
type LDOptions = Pick<LDOptionsCommon, 'logger' | 'sendEvents'>;
type LDOptions = {
/**
* The time-to-live for the cache in milliseconds. The default is 100ms. A
* value of 0 will cache indefinitely.
*/
cacheTtlMs?: number;
} & Pick<LDOptionsCommon, 'logger' | 'sendEvents'>;

/**
* The internal options include featureStore because that's how the LDClient
Expand Down

0 comments on commit da8caea

Please sign in to comment.