Cache search/count advanced search counters
While working on #299099 (closed) and improving search/count
request performance from Elasticsearch, I noticed that it might be beneficial to cache these counters up to 1.minute
(we have such delay for our cron workers that update documents in ES).
It should be helpful even if all searches are unique because when users change tabs they execute these queries on each reload. If we cache these, they will be only loaded once per cache expiry (1.minute
). Most likely, we'd need to include current_user.id
in the cache key in order to keep correct counters.
It could be done on backend or frontend. It's not clear which option is better at the moment.
Screenshots
Edited by Dylan Griffith