Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion service/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/evaluationSuccess'
$ref: '#/components/schemas/serverEvaluationSuccess'
'400':
description: Bad evaluation request
content:
Expand Down Expand Up @@ -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
Comment thread
Kavindu-Dodan marked this conversation as resolved.
evaluationSuccess:
description: Flag evaluation success response.
allOf:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default TTL can be 0 and we will relay only on the polling to evict data from the cache.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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.