Skip to content

Commit 52cc2f6

Browse files
authored
Add missing import in OFREP examples (#600)
* Add missing import in OFREP examples * Add profile caching
1 parent 0deeb44 commit 52cc2f6

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

website/docs/advanced/proxy/endpoints.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,7 @@ This endpoint is used by OFREP compatible OpenFeature providers to evaluate a fe
745745
**Example**:
746746

747747
```js title="example.js"
748+
import { OpenFeature } from "@openfeature/web-sdk";
748749
import { OFREPWebProvider } from '@openfeature/ofrep-web-provider';
749750

750751
OpenFeature.setProvider(
@@ -810,6 +811,7 @@ This endpoint is used by OFREP compatible OpenFeature providers to evaluate all
810811
**Example**:
811812

812813
```js title="example.js"
814+
import { OpenFeature } from "@openfeature/web-sdk";
813815
import { OFREPWebProvider } from '@openfeature/ofrep-web-provider';
814816

815817
OpenFeature.setProvider(

website/docs/advanced/proxy/overview.mdx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ OFREP compatibility is only available from Proxy version <a target="_blank" href
188188
The Proxy conforms to the <a href="https://github.com/open-feature/protocol">OpenFeature Remote Evaluation Protocol</a>, which means it can be used with OFREP compatible OpenFeature providers.
189189

190190
```js title="example.js (Initializing the OFREP JS Web provider to use the Proxy)"
191+
import { OpenFeature } from "@openfeature/web-sdk";
191192
import { OFREPWebProvider } from '@openfeature/ofrep-web-provider';
192193

193194
OpenFeature.setProvider(
@@ -746,6 +747,16 @@ To connect a Proxy instance to a Proxy profile, follow these steps:
746747
</tr>
747748
</tbody>
748749
</table>
750+
<br/>
751+
752+
#### Profile caching
753+
Proxy instances running in online mode are caching their connected profile if they have a [cache](#cache) configured.
754+
This means that other Proxy instances running with [global offline mode](#global-offline-mode) enabled can use those cached profiles from
755+
the same shared cache.
756+
757+
:::info
758+
Offline Proxy instances only need the profile's `key` to read the connected profile from the cache, the `secret` option is not mandatory in this mode.
759+
:::
749760

750761
### 2. Manual configuration
751762

0 commit comments

Comments
 (0)