---
feature_story: FS_39_58_01_91
feature_title: query cache
feature_status: DONE
---

Query cache is an LRU cache with expiration (TTL) for queries with the same `query_dict`
used for FS_55_57_45_04 enum selector version of FS_15_79_76_85 line processor.

It is implemented in `QueryEngine.query_prop_values` (latency-sensitive query).

It optimizes response time for similar queries for at least two main use cases:

*   Initial collection of all possible enum values (via FS_02_25_41_81 `func_id_query_enum_items`).

    The very first enum query returns the largest result set, and
    it re-occurs for all queries per that class of `data_envelopes`.

*   Successive `Tab`-auto-completion requests:

    Each successive request performs the same queries different only by the last one (for the last newly added arg).

See also `QueryCacheConfig`.

