qcache_thresh_msec not working

On latest official version the qcache_thresh_msec setting not working eg:

qcache_thresh_msec=100 (no cache…)
every value greater than 1 will not be cached

qcache_thresh_msec=1 cache works for slow querys… it looks like msec are sec …

regards Peter

Hi. Can you make sure you don’t exceed qcache_max_bytes and if you don’t provide more details on how to reproduce the issue (best as an issue on github) as we have an automated test covering it and I tested it manually and qcache_thresh_msec works fine for me.

the detail is:

query match eg. “news” needs around 1000ms

qcache_thresh_msec=100, 200, 300 … = 1000ms every same query / no cache
qcache_thresh_msec=1 = 30ms on second same query

This is really strange. What’s your OS?

OS is Windows Server 2016

could it be, that qcache_thresh_msec only looks for single index?
If yes, cache is not usable for distributed index…

regards Peter

qcache is local index option, ie it applies per every local index in distributed

tnx for reply - is this correct?

query on distributed index search time:
index1: 10ms
index2: 30ms
index3: 110ms

only index3 query results would be cached?

regards Peter

Yes, this is correct, only requests that take > 100ms will be cached.

hmpf - then cacheing is not usable with distributed local indexes…
not nice :wink:
regards Peter

caching a lot of small queries will cause global cache to evict more cached queries and will make caching less effective

you’re right - but with 18 local indexes the query times are different on every query (same keywords) - sometime index1 is the fastest, some the slowest. So caching with distributed local indexes make no sense…

it is planed in future to cache the hold distributed index?

we have no such features at our backlog as general http proxy caches such requests well and local index cache stores raw documents and provide them back for regroup or rerank and these operations perform at local index level

however you might create ticket at github to be informed on issue progress.