-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Feat: Add option to disable store call cache #6214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: Add option to disable store call cache #6214
Conversation
b48728d to
5d80ef1
Compare
5d80ef1 to
f45feb5
Compare
14c8d6c to
e402cf9
Compare
e402cf9 to
c42495c
Compare
lutter
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good; needs just a small touch-up for the docs
docs/environment-variables.md
Outdated
| - `GRAPH_STORE_DISABLE_CALL_CACHE`: Disables the store call cache entirely. Graph node will skip writing and reading from the | ||
| call cache. The buffered block call cache will still be enabled. This option may be useful | ||
| for indexers who are running their own RPC nodes. Disabling the store call cache may have | ||
| significant performance impact. (default: false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean by The buffered block call cache - do you mean just the block cache?
Also, I would reword 'Disabling the store call cache may have significant performance impact' to something like 'Disabling the store call cache may have significant performance impact; the precise impact depends on how long an eth_call takes on average compared to how long a database lookup of a cached call result takes'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean by The buffered block call cache - do you mean just the block cache?
I meant the in memory call cache that buffers the call results for a duration of a block, before the results is persisted in the DB. Will make this line more clear with something like Call results will still be cached in memory for the duration of a block
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aah; I wouldn't mention that here, it just complicates the description of the environment variable
37e356f to
0e0b823
Compare
Signed-off-by: Maksim Dimitrov <[email protected]>
Signed-off-by: Maksim Dimitrov <[email protected]>
Signed-off-by: Maksim Dimitrov <[email protected]>
0e0b823 to
8ad016d
Compare
Signed-off-by: Maksim Dimitrov <[email protected]>
Resolves #5513
What this PR does:
Introduces an environment variable
GRAPH_STORE_DISABLE_CALL_CACHEthat allows disabling the store call cache. The main motivation is to provide indexers, who use locally hosted RPC nodes, with an option to bypass the graph-node call cache.