com.walmartlabs.lacinia.pedestal.cache

added in 1.1

A parsed query cache can reduce processing time by avoiding the normal parsing of a query.

parsed-query-cache

(parsed-query-cache max-count)

Returns a simple, synchronized, LRU cache.

ParsedQueryCache

protocol

members

get-parsed-query

(get-parsed-query this cache-key)

Returns a parsed query from the cache, if it contains the query.

The cache-key uniquely identifies the query and the operation name.

Returns the previously stored parsed query, or nil if not found.

store-parsed-query

(store-parsed-query this cache-key parsed-query)

Stores a parsed query into the cache.

Returns the parsed query.

The cache may need to modify the parsed query prior to storing it. It should store and return the modified parsed query; the return value is what will be attached to the Ring request map.

synchronized-lru-map

(synchronized-lru-map max-count)

Creates an LRU map, ordered by access, with a maximum number of stored values.