Skip to content
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

[Cherrypick] Cache enablement check and dab-draft.schema.json changes #2033

Merged
merged 5 commits into from
Feb 13, 2024

Conversation

seantleonard
Copy link
Contributor

Cherry picks #2011 and #2012 to main

2012

Why make this change?

  • Ensure cache is used when enabled and add additional checks to make this flow as expected.

What is this change?

  • Change cache check to ensure dbpolicies are NOT resolved for request in order to use cache
  • Add check to ensure entity cache is enabled.

2011

Why this change?

This change follows up on #1865, which adds caching support.
VSCode suggesting the new cache properties were errors when included in the config file. That is because the properties needed to be added to the json schema.

Global cache property in the runtime section which adjacent to rest, graphql, and host.

{
  "runtime": {
    "cache": {
      "enabled": false,
      "ttl-seconds": 5
    }
  }
}

and per entity alongside source, graphql, rest, and permissions

{
  "myEntity": {
    "cache": {
      "enabled": false,
      "ttl-seconds": 5
    }
  }
}

## Why make this change?

- Ensure cache is used when enabled and add additional checks to make
this flow as expected.

## What is this change?

- Change cache check to ensure dbpolicies are NOT resolved for request
in order to use cache
- Add check to ensure entity cache is enabled.

## How was this tested?

- TBD
## Why this change?

This change follows up on
#1865, which adds caching
support.
VSCode suggesting the new `cache` properties were errors when included
in the config file. That is because the properties needed to be added to
the json schema.

Global `cache` property in the `runtime` section which adjacent to
`rest`, `graphql`, and `host`.

```json
{
  "runtime": {
    "cache": {
      "enabled": false,
      "ttl-seconds": 5
    }
  }
}
```

and per entity alongside `source`, `graphql`, `rest`, and `permissions`

```json
{
  "myEntity": {
    "cache": {
      "enabled": false,
      "ttl-seconds": 5
    }
  }
}
```
@seantleonard
Copy link
Contributor Author

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@seantleonard seantleonard added this to the 0.12rc milestone Feb 13, 2024
@seantleonard
Copy link
Contributor Author

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@seantleonard seantleonard enabled auto-merge (squash) February 13, 2024 05:25
@seantleonard seantleonard merged commit a64c277 into main Feb 13, 2024
14 checks passed
@seantleonard seantleonard deleted the dev/sean/cherrypick-caching-items-010 branch February 13, 2024 05:46
@Aniruddh25 Aniruddh25 modified the milestones: 0.12rc, 0.11rc Feb 13, 2024
@Aniruddh25 Aniruddh25 modified the milestones: 0.11rc, 0.12rc Feb 13, 2024
@seantleonard seantleonard added the 🍒Cherrypick Cherry-picking another commit/PR label May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒Cherrypick Cherry-picking another commit/PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants