The datastore commit function does a refresh as well as a clear_cache of the elasticsearch database.
This function is called from several places in the code, but maybe most important is upon hit creation.
Clearing the index cache can negatively impact ES performance and potentially slow down the entire system.
If some database queries need to ignore the cache, the cache can be bypassed using the request_cache=false parameter:
https://www.elastic.co/docs/reference/elasticsearch/rest-apis/shard-request-cache#_enabling_and_disabling_caching_per_request
However, the cached results are automatically invalidated upon index refresh, so this may not be needed at all.
ref: https://www.elastic.co/docs/reference/elasticsearch/rest-apis/shard-request-cache#_cache_invalidation
The datastore commit function does a refresh as well as a clear_cache of the elasticsearch database.
howler/api/howler/datastore/collection.py
Line 522 in fe81cf9
This function is called from several places in the code, but maybe most important is upon hit creation.
howler/api/howler/api/v1/hit.py
Line 128 in fe81cf9
Clearing the index cache can negatively impact ES performance and potentially slow down the entire system.
If some database queries need to ignore the cache, the cache can be bypassed using the request_cache=false parameter:
https://www.elastic.co/docs/reference/elasticsearch/rest-apis/shard-request-cache#_enabling_and_disabling_caching_per_request
However, the cached results are automatically invalidated upon index refresh, so this may not be needed at all.
ref: https://www.elastic.co/docs/reference/elasticsearch/rest-apis/shard-request-cache#_cache_invalidation