Azure / Azure/data-api-builder

[CLI]: `dab update` Cache Settings

Open
#1,919 0 comments 0 reactions 0 assignees View on GitHub
cli
Dominant language
C#
Stars
1.5k
Forks
370
Avg merge
3d 17h
Merged PRs (30d)
8

Description

Add capability to modify global and entity level cache settings within the CLI.

cache properties currently take the form:

```json
"cache": {
"ttl-seconds": 12,
"enabled": true
}
```
- `ttl-seconds` defaults to `5`
- `enabled` defaults to `false`

The model file for cache options has a hidden/non-json exposed property called `isUserDefined`. This property automatically captures whether the user explicitly sets `ttl-seconds`. If the user doesn't explicitly set a value, DAB uses the configured global cache `ttl-seconds` or if global settings aren't explicitly set, uses 5 seoconds. -> for CLI, if user doesn't explicitly set `ttl-seconds` DO NOT assume a default value and set. Just pass null.
When user does not define `ttl-seconds` the property `ttl-seconds` should NOT be written to the output JSON file. That is the behavior now, and shouldn't change.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.