-
Notifications
You must be signed in to change notification settings - Fork 291
Enable caching stored procedure results -> REST (GET) GraphQL (Queries) #2314
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
Conversation
…ort for using cache. Updated method signature formatting in DabCacheService to have params on new lines.
|
how would it work, when caching is disabled globally but enabled at entity level or vice-versa? |
… serializing, just returning null jsondoc. -> addresses pr feedback.
…a-api-builder into dev/sean/cache_sp_2299
@abhishekkumams
|
|
/azp run |
|
Would this cache results even if the stored proc has a mutation operation in it? If thats the case, in a cache hit, will the stores proc not be executed? So, for cache hits, we will NOT execute the mutation operation.. Is the responsibility to ensure they enable cache only for READ-ONLY stored procs with our customer developers? |
…tances of "cacheEntryTtl" variable name to "cacheEntryTtlInSeconds"
Aniruddh25
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, left a few questions and suggestions
…h checks for invocation > 1 and invocation = 1 to give separate error messages to clearly indicate whether the cache wasn't hit
…a-api-builder into dev/sean/cache_sp_2299
No, this code is within the QueryEngine so Stored Procedures configured as mutations would not enter this code path. |
|
/azp run |

Why make this change?
What is this change?
private async Task<JsonDocument?> ExecuteAsync(SqlExecuteStructure structure, string dataSourceName)to utilize DAB's cache service.RuntimeConfig.Cache.Enabledis trueRuntimeConfig.DataSource.Options.SetSessionContextis falseJsonArray:_cache.GetOrSetAsync<JsonArray?>(...)How was this tested?
JsonArraysucceeds. This covers how stored procedures are executed in the query engine.Sample Request(s)
Dab config: use example entity at top of this description.
Example stored procedure:
REST
GraphQL