You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Why make this change?
- Second set of work attributed to #1618#1617
## What is this change?
- Implements the design in #1801. The one behavior which isn't in this
PR is caching GraphQL "list" queries. That will come in a separate
commit once i resolve the errors that arise with generics and the
DataReaderHandler delegates.
- Creates a `DabCacheService` which is used in database queries
(REST/GraphQL) such that requests and responses are cached in memory.
- This PR is not dependent on #1865. However, once that PR and this PR
are merged, a third follow-up PR will make a small adjustment in
`SqlQueryEngine.ExecuteAsync(...)` such that the `cacheEntryTtl` and
`cacheEnabled` values are resolved from runtime config and used
determine whether to use the cache and how to use the cache.
## How was this tested?
- [x] Integration Tests -> integration tests included which mock the
QueryExecutor and test how the DabCacheService handles request metadata
and caching method execution. The integration tests aim to test the
**behavior** of the DabCacheService and intentionally do not make
private methods public or break out key generation and entry size
calculation into separate classes. Additionally, the integration tests
are not meant to test the functionality of FusionCache. That library has
its own tests which validate functionality.
## Sample Request(s)
Until all related PRs are merged, this feature is gated by a feature
flag. To add the feature flag, add the following snippet to the
`AppConfig.json`:
```json
// Define feature flags in config file
"FeatureManagement": {
"CachingPreview": true, // Turn-On feature
}
```
Point requests will be cached with a default 10 second ttl. You can try
out whether response times are quicker for your use case.
0 commit comments