The relay support caching for some endpoints and not others. We should assess which would no benefit from it and which may need TTL times updated based on usage
Solution
Add cache support to heavily utilized methods in which the response does not change
[ ] Assess endpoint metrics, what are the heaviest utilized
[ ] Assess endpoint responses, which are static based on params which do not yet have caching
[ ] Add caching logic with consideration for mirror node refresh times to ensure details are still fresh
[x] #1059
[x] #1210
[x] #1057
[ ] eth_chainId
[ ] eth_feeHistory
[ ] net_version
[ ] eth_estimateGas
[x] #1212
[x] eth_getBlockByNumber
[x] #1221
[ ] Permanently cache Earliest block
[ ] Add cache support for some consensus node calls
Additionally, perhaps the mirror node could support an event stream (callbacks) that could notify of interesting events that would directly inform cache invalidation. E.g., new block added.
Problem
The relay support caching for some endpoints and not others. We should assess which would no benefit from it and which may need TTL times updated based on usage
Solution
Add cache support to heavily utilized methods in which the response does not change
Alternatives
No response