data-api-builder icon indicating copy to clipboard operation
data-api-builder copied to clipboard

[CLI]: `dab update` Cache Settings

Open seantleonard opened this issue 2 years ago • 0 comments

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

cache properties currently take the form:

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

seantleonard avatar Dec 07 '23 18:12 seantleonard