You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2020/02/11 21:24:36 UTC

[GitHub] [druid] suneet-s commented on a change in pull request #9280: CacheStrategy: Improve Javadocs.

suneet-s commented on a change in pull request #9280: CacheStrategy: Improve Javadocs.
URL: https://github.com/apache/druid/pull/9280#discussion_r377907596
 
 

 ##########
 File path: processing/src/main/java/org/apache/druid/query/CacheStrategy.java
 ##########
 @@ -48,21 +50,27 @@
   boolean isCacheable(QueryType query, boolean willMergeRunners);
 
   /**
-   * Computes the cache key for the given query
+   * Computes the per-segment cache key for the given query. Because this is a per-segment cache key, it should only
+   * include parts of the query that affect the results for a specific segment (i.e., the results returned from
+   * {@link QueryRunnerFactory#createRunner}).
    *
-   * @param query the query to compute a cache key for
+   * @param query the query to be cached
    *
-   * @return the cache key
+   * @return the per-segment cache key
    */
   byte[] computeCacheKey(QueryType query);
 
   /**
-   * Computes the result level cache key for the given query.
-   * Some implementations may include query parameters that might not be used in {@code computeCacheKey} for same query
+   * Computes the result-level cache key for the given query. The result-level cache will tack on datasource and
+   * interval details, so this key does not need to incluce datasource and interval. But it should include anything
 
 Review comment:
   ```suggestion
      * interval details, so this key does not need to include datasource and interval. But it should include anything
   ```
   
   ^ trying out github suggestions, supposedly it lets you accept a change without needing to make the change locally :)
   
    https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/incorporating-feedback-in-your-pull-request#applying-suggested-changes 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org