Replies: 8 comments 16 replies
-
1- which parts of the router will need cache:
|
Beta Was this translation helpful? Give feedback.
-
2- where do we want to store the cache:
|
Beta Was this translation helpful? Give feedback.
-
one important feature that appeared: if we get a lot of similar queries at the same time, when the cache does not have the value, we should do the work once and have all queries wait on it. In async code |
Beta Was this translation helpful? Give feedback.
-
3- which caching strategy do we use:
See https://en.wikipedia.org/wiki/Cache_replacement_policies for a list of the main ones |
Beta Was this translation helpful? Give feedback.
-
we need a way to keep some of the elements always present in cache, like introspection queries |
Beta Was this translation helpful? Give feedback.
-
4- how do we choose the limit for the cache?
|
Beta Was this translation helpful? Give feedback.
-
5- how do we configure it? Do we make it configurable?
|
Beta Was this translation helpful? Give feedback.
-
6- if we cache data from subgraphs, some of the data might be private, so cache access could depend on a variable (user id, auth token, etc) |
Beta Was this translation helpful? Give feedback.
-
related:
there has been a lot of discussion recently on caching, following up on #42 where we wanted to move from a hashmap to anything that resembled a cache, and settled on lru in #174 and #205. We now want to refactor both in a single type in #217.
It is now a good time to discuss the features we would want from a cache implementation, considering that this part of the Rust ecosystem is not well developed (example: stretto is very young), and this will likely be a crucial part of our graphql implementation.
Beta Was this translation helpful? Give feedback.
All reactions