Invalidating query cache dating a preacher39s daughter

Posted by / 29-Sep-2020 06:54

Invalidating query cache

In both cases, the cache is invalidated as soon as any underlying data changes; it will never return a stale result.

Segment-level caching allows the cache to be leveraged even when some of the underling segments are mutable and undergoing real-time ingestion.

Once the lifespan expires, the cache is invalidated.

This will use more memory on the Gateway (to maintain the results), but could result in less queries running against the database.Segment-level caching does require Druid to merge the per-segment results on each query, even when they are served from the cache.For this reason, whole-query result level caching can be more efficient if invalidation due to real-time ingestion is not an issue.This impairs the ability of the Druid cluster to scale well. Segment-level caching is controlled by the query context parameters .Larger production clusters should enable segment-level cache population on Historicals only (not on Brokers) to avoid having to use Brokers to merge all query results.

invalidating query cache-89invalidating query cache-12invalidating query cache-82

Enabling cache population on the Historicals instead of the Brokers enables the Historicals to do their own local result merging and puts less strain on the Brokers.