In a running data domain, you can issue a request to warm up the cache of its Dgraph processes.
To issue the cache-warming request, use the warmCache operation of the Manage Web Service or this Endeca Server command:
endeca-cmd warm-cache-dd <name> --time-limit-sec <sec>This operation improves performance of the Endeca Server and is useful to run, for instance, after an update for loading data records.
Caching of end-user queries plays an important role in the query performance of the Dgraph process, as it allows the Dgraph to reuse its computation and thus help reduce the user-observable latencies. However, each time there is an update to the index, most of the cache entries become outdated since they depend upon the index version. The Endeca Server provides a cache warming operation to warm the Dgraph cache after updates. The operation obviates the need to create custom warm-up scripts.
You must explicitly issue the cache warming request as it does not run automatically. The only parameter for the operation is the time limit for which the cache warming job is allowed to run. The cache warming operation asks the Dgraph cache to generate a list of representative queries and plays them back to the Endeca Server. It thus warms the Dgraph cache, but does not take more than the specified time. A successful invocation of cache warming operation returns immediately with an empty response and starts the cache warming job in the background. Once the time limit is reached, the cache warming job stops. If during this time you issue any other requests to the Endeca Server, they take priority over cache warming job. If you issue a cache warming operation in an Endeca Server cluster hosting a data domain, the operation runs on all Dgraph nodes serving this data domain.
The cache warming operation takes into account the current Dgraph process usage pattern for selecting the set of representative queries for replay. Note that the existing cache may also contain queries that won't run after the index had changed, for example, because the records schema had changed after an update. The cache warming operation ignores errors from such queries (if they are selected for replay), and proceeds to run other queries in its list. The actual queries replayed by the cache warming operation do not appear in the request log.
To issue a request to warm up the Dgraph cache: