You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Response times of repeated FGA `check` calls, especially in high volume scenarios, can be reduced to sub-millisecond scales by re-directing the calls to a Descope FGA Cache Proxy running in the same backend cluster as your application.
1228
+
After setting up the proxy server via the Descope provided Docker image, set the `fga_cache_url` parameter to be equal to the proxy URL to enable its use in the SDK, as shown in the example below:
1229
+
1230
+
```python
1231
+
# Initialize client with FGA cache URL
1232
+
descope_client = DescopeClient(
1233
+
project_id="<Project ID>",
1234
+
management_key="<Management Key>",
1235
+
fga_cache_url="https://10.0.0.4", # example FGA Cache Proxy URL, running inside the same backend cluster
1236
+
)
1237
+
```
1238
+
1239
+
When the `fga_cache_url` is configured, the following FGA methods will automatically use the cache proxy instead of the default Descope API:
1240
+
-`save_schema`
1241
+
-`create_relations`
1242
+
-`delete_relations`
1243
+
-`check`
1244
+
1245
+
Other FGA operations like `load_schema` will continue to use the standard Descope API endpoints.
1246
+
1227
1247
### Manage Project
1228
1248
1229
1249
You can change the project name, as well as clone the current project to
"Received Invalid token (nbf in future) during jwt validation. Error can be due to time glitch (between machines), try to set the jwt_validation_leeway parameter (in DescopeClient) to higher value than 5sec which is the default",
0 commit comments