-
Notifications
You must be signed in to change notification settings - Fork 6
feat: Specify caching for OFREP in server providers #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,7 +48,7 @@ paths: | |
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: '#/components/schemas/evaluationSuccess' | ||
| $ref: '#/components/schemas/serverEvaluationSuccess' | ||
| '400': | ||
| description: Bad evaluation request | ||
| content: | ||
|
|
@@ -223,6 +223,13 @@ components: | |
| properties: | ||
| context: | ||
| $ref: '#/components/schemas/context' | ||
| serverEvaluationSuccess: | ||
| allOf: | ||
| - $ref: "#/components/schemas/evaluationSuccess" | ||
| - properties: | ||
| cacheable: | ||
| type: boolean | ||
| description: Let the provider know that this flag evaluation can be cached | ||
| evaluationSuccess: | ||
| description: Flag evaluation success response. | ||
| allOf: | ||
|
|
@@ -363,6 +370,8 @@ components: | |
| $ref: '#/components/schemas/featureCacheInvalidation' | ||
| flagEvaluation: | ||
| $ref: '#/components/schemas/flagEvaluation' | ||
| caching: | ||
| $ref: '#/components/schemas/featureCaching' | ||
| flagEvaluation: | ||
| type: object | ||
| description: Configurations specific for flag evaluations in OFREP provider implementation | ||
|
|
@@ -400,3 +409,15 @@ components: | |
| - 60000 | ||
| required: | ||
| - name | ||
| featureCaching: | ||
| type: object | ||
| description: Configuration of the caching mechanism in the provider (used by server providers) | ||
| properties: | ||
| enabled: | ||
| type: boolean | ||
| description: set to true if you want the provider to cache the evaluation results | ||
| ttl: | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Default
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agree, by default the behaviour should be no-cache so every evaluation is done remotely. |
||
| type: number | ||
| examples: | ||
| - 1000 | ||
| description: number (in millisecond) to wait before invalidating the cache. If we have cacheInvalidation enabled, the cache can also be evicted if a configuration change happen. | ||
Uh oh!
There was an error while loading. Please reload this page.