All caches have a pair of parameters that control the behavior of how individual queries interact with the cache, a 'use' cache parameter, and a 'populate' cache parameter. These settings must be enabled at the service level via [runtime properties](../configuration/index.md) to utilize cache, but can be controlled on a per query basis by setting them on the [query context](../querying/query-context.md). The 'use' parameter obviously controls if a query will utilize cached results. The 'populate' parameter controls if a query will update cached results. These are separate parameters to allow queries on uncommon data to utilize cached results without polluting the cache with results that are unlikely to be re-used by other queries, for example large reports or very old data.
- Queries, that involve a `union` datasource, do not support result-level caching. Refer to the
[related issue](https://github.com/apache/druid/issues/8713) for details. Please note that not all union SQL queries are executed using a union datasource. You can use the `explain` operation to see how the union query in sql will be executed.
- Queries, that involve an `Inline` datasource or a `Lookup` datasource, do not support any caching.
- Queries, with a sub-query in them, do not support any caching though the output of sub-queries itself may be cached.
Refer to the [Query execution](query-execution.md#query) page for more details on how sub-queries are executed.
- Join queries do not support any caching on the broker [More details](https://github.com/apache/druid/issues/10444).
- GroupBy v2 queries do not support any caching on broker [More details](https://github.com/apache/druid/issues/3820).
- Data Source Metadata queries are not cached anywhere.
- Queries, that have `bySegment` set in the query context, are not cached on the broker. They are currently cached on
historical but this behavior will potentially be removed in the future.