The cache is optional. When present, the cache uses the full query document and the operation name (often nil) as the cache key. When a parsed query is present in the cache, it is used - bypassing the call to parse-query. Otherwise, parsed-query is invoked and, if successful, the parsed query is stored into the cache for later use.
A simple LRU cache with a maximum storage size is implemented.
The cache is optional. When present, the cache uses the full query document and the operation name (often nil) as the cache key. When a parsed query is present in the cache, it is used - bypassing the call to
parse-query
. Otherwise,parsed-query
is invoked and, if successful, the parsed query is stored into the cache for later use.A simple LRU cache with a maximum storage size is implemented.