Difference between 'useCache' and 'populateCache'?

The description for ‘populateCache’ says (for historical):

“Populate the cache on the historical.”

Does this mean a separate ‘local’ cache apart from the configured (redis) cache is populated?

or does it just mean ‘let historical populate the cache’? in that case how is it different from ‘use cache’?

It means “let historical populate the cache”. It’s different from useCache, because useCache means it can read the cache. You can think of one as controlling writes to cache and the other as controlling reads.

i am still a little confused.

is there any scenario where a node have ‘useCache=true’ but ‘populateCache=false’?

say i am enabling caching on historical:

  1. on historical, i would set ‘useCache=true’ and ‘populateCache=true’.

is there any reason why i would ever set ‘populateCache=false’?

  1. are there any other nodes (like broker) where i would still need to set either of those properties?

If you want to enable caching on historicals, you’d set those two properties on historicals and set neither of them anywhere else.

There’s potentially a case for enabling useCache but not populateCache on the brokers, the idea being you can leverage cached items on the broker without having to force historicals to send results back to the broker for every individual segment (useCache does this). It’s something you could experiment with; I’m not sure if it’d be better or worse than the defaults. I think this would count as an ‘advanced’ thing and wouldn’t worry about it unless you were trying to really hyper optimize your caching setup.