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/18 10:58:32 UTC

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

khwj commented on a change in pull request #9280: CacheStrategy: Improve Javadocs.
URL: https://github.com/apache/druid/pull/9280#discussion_r380593153
 
 

 ##########
 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
 
 Review comment:
   I was going to file a bug about result-level cache key computation does not taken interval details into account until this comes along. If this is intentional, it still not clear about how the result-level cache "tacking on datasource and interval details". Maybe it's better to add more docs on this part?

----------------------------------------------------------------
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