Cache configuration: "useCache" and "populateCache"?

Hi forks.

I’m newbie on using cache with druid. I got a bit confused about cache configuration. It’s my pleasure if any forks explain my question below.

What’s the purpose of separate ‘useCache’ and ‘populateCache’?

For example,

druid.historical.cache.useCache=true

druid.historical.cache.populateCache=false

Is it reasonable configuration? Isn’t it true that every user who want to set using cache must set ‘true’ on above both configuration? I think, every user want to enable or disable cache set above both configuration with all the true or all the false. What’s the purpose of separate this configuration? What’s the use case?

Hi Dongkye,
‘populateCache’ option seems to be used for debugging. Please refer to http://druid.io/docs/latest/querying/query-context.html.

Thanks,

Jihoon

2017년 3월 17일 (금) 오후 5:50, Dongkyu Hwangbo hwangbodk@gmail.com님이 작성:

The simple answer for the "debugging" case, is if you suspect that you
are getting bad results because you have cached a bad result (for
whatever reason), then you can set "useCache=false" to force the query
to re-compute results along with "populateCache=true" in order to get
those results pushed into the cache, effectively replacing the "bad"
values.

This is primarily useful when set on the query context itself.

--Eric

Hi Jihoon, Eric
Thanks for kind explanation!

Dongkyu

2017년 3월 17일 금요일 오후 5시 50분 30초 UTC+9, Dongkyu Hwangbo 님의 말: