-
Notifications
You must be signed in to change notification settings - Fork 229
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
Async cache setting #1736
Async cache setting #1736
Conversation
...standalone/src/main/java/com/yahoo/elide/standalone/config/ElideStandaloneAsyncSettings.java
Outdated
Show resolved
Hide resolved
@@ -49,10 +53,13 @@ public AsyncAPIResult call() throws URISyntaxException, NoHttpResponseException | |||
ElideResponse response = null; | |||
log.debug("AsyncQuery Object from request: {}", this); | |||
UUID requestUUID = UUID.fromString(queryObj.getRequestId()); | |||
Map<String, List<String>> bypassCacheMap = new HashMap<String, List<String>>(); | |||
bypassCacheMap.put("bypasscache", Arrays.asList(String.valueOf(service.isBypassCache()))); |
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.
Won't this always override the cache? I don't think this is the behavior that we want.
if (queryObj.getQueryType().equals(QueryType.JSONAPI_V1_0)) { | ||
response = executeJsonApiRequest(service.getElide(), user, apiVersion, requestUUID); | ||
response = executeJsonApiRequest(service.getElide(), user, apiVersion, requestUUID, bypassCacheMap); |
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.
Instead of naming the variable bypassCacheMap, call it headers. It is a better reflection of what the map represents.
Closing since we are going to enable / disable caching based on Max cache size property, not on/off property |
Resolves #1537 (if appropriate)
Description
Add 'bypassCache' property to Async to enable/disable caching.
Motivation and Context
Enable / Disable Caching via Async properties
How Has This Been Tested?
Unit tests included.
Screenshots (if appropriate):
License
I confirm that this contribution is made under an Apache 2.0 license and that I have the authority necessary to make this contribution on behalf of its copyright owner.