About Query Cache

A query cache can be either:

  • Consistent: clears the existing cache every time the index is updated, which ensures up-to-date results but impacts performance for frequently changing indexes.

    The query cache is invalidated at the beginning of the index update. If the replication is slow, you may experience query cache being repopulated by empty or partial results recorded while the replication was running. You can invalidate the consistent query cache at the end of the replication by running the following command on all secondary servers: ​http://<HOST>:<BASEPORT+10>/search-api/cache/evict

  • Time-based: keeps a query in cache for N seconds, this generates a new cache to create a continuous update of the cache at the risk of the occasional stale result.

This page discusses:

See Also
Creating and Managing a Query Cache