Since you are using a boolean as cached value, getOrSet will always lead to a cache miss, as soon as false is getting cached which will trigger slow queries on every CP request making working with the dashboard very frustrating. You could use a string instead of a boolean to mitigate that problem.
Hi,
I have an installation maintaining around 60K entries.
I noticed slow response times in CP and figured out that https://github.com/la-haute-societe/craft-elasticsearch/blob/33782a380eace29d2e4ff842821b65475895e836/src/services/ElasticsearchService.php#L86-L127 causes SELECT COUNT(*) queries on every CP request which are slow. (>1 second with 60K entries)
Since you are using a boolean as cached value,
getOrSet
will always lead to a cache miss, as soon asfalse
is getting cached which will trigger slow queries on every CP request making working with the dashboard very frustrating. You could use a string instead of a boolean to mitigate that problem.