Skip to content

Conversation

@keelerm84
Copy link
Member

Previously, the LDClient would issue a call to prime the store with
data, which would be retained for the lifetime of the variation or all
flags call.

This priming call is being removed in favor of a simple TTL cache. The
cache will be populated on the initial usage of the SDK, and then
periodically as it is detected to be expired.

The TTL can be configured with:

  • Positive value representing the time to cache the value
  • 0 to cache the value indefinitely. This allows a customer to
    initialize the SDK within an EdgeWorker handler, and get a "snapshot"
    of the view for the lifetime of the SDK.
  • Negative value representing no cache. This value is highly discouraged
    as usage restrictions in Akamai make it ineffective.

@keelerm84 keelerm84 requested a review from a team as a code owner February 21, 2025 16:32
@github-actions
Copy link
Contributor

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Size: 19014 bytes
Size limit: 21000

@github-actions
Copy link
Contributor

@launchdarkly/js-client-sdk-common size report
This is the brotli compressed size of the ESM build.
Size: 15371 bytes
Size limit: 20000

@github-actions
Copy link
Contributor

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Size: 19871 bytes
Size limit: 21000

Previously, the LDClient would issue a call to prime the store with
data, which would be retained for the lifetime of the variation or all
flags call.

This priming call is being removed in favor of a simple TTL cache. The
cache will be populated on the initial usage of the SDK, and then
periodically as it is detected to be expired.

The TTL can be configured with:

- Positive value representing the time to cache the value
- 0 to cache the value indefinitely. This allows a customer to
  initialize the SDK within an EdgeWorker handler, and get a "snapshot"
  of the view for the lifetime of the SDK.
- Negative value representing no cache. This value is highly discouraged
  as usage restrictions in Akamai make it ineffective.
@keelerm84 keelerm84 force-pushed the mk/sdk-1075/json-decoding branch from 6eb196a to cfe2a73 Compare February 21, 2025 16:34
@keelerm84 keelerm84 requested a review from kinyoklion February 21, 2025 20:40
@keelerm84 keelerm84 merged commit 48b48cf into main Feb 26, 2025
22 checks passed
@keelerm84 keelerm84 deleted the mk/sdk-1075/json-decoding branch February 26, 2025 15:02
@github-actions github-actions bot mentioned this pull request Feb 26, 2025
keelerm84 pushed a commit that referenced this pull request Feb 26, 2025
🤖 I have created a release *beep* *boop*
---


<details><summary>akamai-edgeworker-sdk-common: 2.0.0</summary>

##
[2.0.0](akamai-edgeworker-sdk-common-v1.4.1...akamai-edgeworker-sdk-common-v2.0.0)
(2025-02-26)


### ⚠ BREAKING CHANGES

* Replace prefetch behavior with simple TTL cache
([#786](#786))

### Features

* Replace prefetch behavior with simple TTL cache
([#786](#786))
([48b48cf](48b48cf))
</details>

<details><summary>akamai-server-base-sdk: 3.0.0</summary>

##
[3.0.0](akamai-server-base-sdk-v2.1.23...akamai-server-base-sdk-v3.0.0)
(2025-02-26)


### ⚠ BREAKING CHANGES

* Replace prefetch behavior with simple TTL cache
([#786](#786))

### Features

* Replace prefetch behavior with simple TTL cache
([#786](#786))
([48b48cf](48b48cf))


### Dependencies

* The following workspace dependencies were updated
  * dependencies
* @launchdarkly/akamai-edgeworker-sdk-common bumped from ^1.4.1 to
^2.0.0
</details>

<details><summary>akamai-server-edgekv-sdk: 1.4.2</summary>

##
[1.4.2](akamai-server-edgekv-sdk-v1.4.1...akamai-server-edgekv-sdk-v1.4.2)
(2025-02-26)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
* @launchdarkly/akamai-edgeworker-sdk-common bumped from ^1.4.1 to
^2.0.0
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants