Skip to content

Commit c2b4145

Browse files
TymekjeremiewtdFlorent-Wanteeedivarconr
authored
feat: prevent fetch on load (#224)
New option `togglesStorageTTL` that prevents fetching the flags if they are up to date. --------- Co-authored-by: Jérémie Richardeau <jeremie@wanteeed.com> Co-authored-by: Florent <florent@wanteeed.com> Co-authored-by: Florent-Wanteeed <98741168+Florent-Wanteeed@users.noreply.github.com> Co-authored-by: Ivar Conradi Østhus <ivar@getunleash.ai>
1 parent dc3aa0f commit c2b4145

File tree

5 files changed

+701
-11
lines changed

5 files changed

+701
-11
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ The Unleash SDK takes the following options:
136136
| impressionDataAll | no| `false` | Allows you to trigger "impression" events for **all** `getToggle` and `getVariant` invocations. This is particularly useful for "disabled" feature toggles that are not visible to frontend SDKs. |
137137
| environment | no | `default` | Sets the `environment` option of the [Unleash context](https://docs.getunleash.io/reference/unleash-context). This does **not** affect the SDK's [Unleash environment](https://docs.getunleash.io/reference/environments). |
138138
| usePOSTrequests | no | `false` | Configures the client to use POST requests instead of GET when requesting enabled features. This is helpful when sensitive information (like user email, when used as a user ID) is passed in the context to avoid leaking it in the URL. NOTE: Post requests are not supported by the frontend api built into Unleash. |
139-
139+
| experimental | no | `{}` | Enabling optional experimentation. `togglesStorageTTL` : How long (Time To Live), in seconds, the toggles in storage are considered valid and should not be fetched on start. If set to 0 will disable expiration checking and will be considered always expired. |
140140

141141
### Listen for updates via the EventEmitter
142142

0 commit comments

Comments
 (0)