Closed qfliu closed 1 month ago
Hello! It is indeed not configurable. I'm unlikely to add that feature in the 7.17 client, but could definitely consider it in the 8.x client. Thanks.
Hello! It is indeed not configurable. I'm unlikely to add that feature in the 7.17 client, but could definitely consider it in the 8.x client. Thanks.
Thanks for the reply!
Just to clarify: We have to use dns_cache regardless 7.x or 8.x right now when creating the client. But, can we change it later through another function call by any chance? If not, does that mean we have to use dns_cache all the time right now with es client? Were it every being configurable after making AsyncElasticsearch native instead of using elasticsearch_async lib? Thanks
Hey, sorry for missing your reply here. Trying to answer your questions point by point:
use_dns_cache=True
all the time. But as you can see in https://docs.aiohttp.org/en/stable/client_advanced.html#tuning-the-dns-cache, the cache is only valid for 10 seconds. How is that a problem for you?I'm going to close this now, but I'm happy to reopen if I hear about a specific use case that would benefit from this. Thank you!
elasticsearch-py version: v7.17.9
Description: In the old elasticsearch_async library, when creating a AsyncElasticsearch object, we can set value for use_dns_cache to disable dns caching. However, this does not work right now.
Code snippet:
I am expecting the output to be False, but it is always True right now.
Am I doing something wrong to set the
use_dns_cache
value?