-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
c/serverRelated to serverRelated to serverp/highcandidate for being included in the upcoming sprintcandidate for being included in the upcoming sprint
Description
This is one of the TODOs in #3530
- Consider making the bounded cache the default since...
- it is equally effective for the use case that the cache was designed for: a finite number of elements
- even a small size is similarly performant to unbounded when the domain is
unbounded with long tail (note in this scenario the unbounded cache is
inappropriate anyway since it implies unbounded space usage)- the bookkeeping in the LRU cache might allow us to collect important
telemetry data from users (see above).
Also, it is impossible to switch off the query plan caching by setting HASURA_GRAPHQL_QUERY_PLAN_CACHE_SIZE: 0
From code:
( "HASURA_GRAPHQL_QUERY_PLAN_CACHE_SIZE"
, "The maximum number of query plans that can be cached, allowed values: 0-65535, " <>
"0 disables the cache. If this value is not set, there is no limit on the number " <>
"of plans that are cached"
)
When I set to 0, server doesn't start with
Environment variable HASURA_GRAPHQL_QUERY_PLAN_CACHE_SIZE: cache size must be given as a number between 1 and 65535
EDIT (Brandon):
- analyze telemetry we've been collecting about cache to find an appropriate size, and any other insights. Have a back-of-the-envelope figure for how much memory a cache of size
Nis likely to consume. - support disabling cache entirely with 0
- make bounded the default and update documentation
Metadata
Metadata
Assignees
Labels
c/serverRelated to serverRelated to serverp/highcandidate for being included in the upcoming sprintcandidate for being included in the upcoming sprint