NodeCache EVM
← Back to blog

Achieving Faster Ethereum RPC: Why Your App Keeps Re-Fetching the Same Data

September 3, 2026

Ethereum applications often repeatedly fetch the same blockchain data, leading to redundant read-only RPC calls for immutable or slowly changing data. A caching layer like NodeCache can intercept these requests and serve known responses directly from its cache.

The Challenge: Redundant Ethereum RPC Calls

Ethereum developers and backend engineers often find their applications or indexers repeatedly fetching identical data from RPC providers such as Infura or Alchemy. This recurring pattern, especially for read-only calls like eth_call, eth_getBalance, and eth_getLogs, incurs repeated requests to RPC providers. The core problem is that applications often request data that has not changed since the last query, yet they wait for a fresh response every time. This cycle of redundant requests can lead to inefficiencies.

Understanding the Problem: Why Applications Re-fetch Data

Applications interact with the blockchain in various ways that lead to redundant data fetching. For instance, a dApp might poll a user's token balance every few seconds, an indexer could be constantly querying contract state variables for thousands of addresses, or a backend service might fetch historical logs for an event that occurred long ago. In many of these scenarios, the underlying blockchain data remains static for extended periods, yet each request consumes resources and counts towards rate limits.

This issue often arises because developers, accustomed to immediate data consistency in traditional databases, apply similar patterns to blockchain interactions without considering the inherent immutability of much of the data. Common mistakes include:

  1. Naive Polling: Continuously asking for data on a fixed interval without checking if the data has actually changed or if it's even capable of changing frequently.
  2. Lack of Local State Management: Not maintaining a local copy of data that is known to be static or slowly changing, forcing every request to go to the RPC provider.
  3. Ignoring Data Immutability: Treating all blockchain data as highly dynamic, even when querying historical states, contract code, or specific configuration parameters that are fixed after deployment.

As an application's user base grows or an indexer's scope expands, the volume of RPC requests scales linearly, irrespective of actual data changes on the blockchain. This creates a disproportionate burden on infrastructure, consuming resources to re-fetch identical data rather than processing new information or unique queries. Without an intelligent caching mechanism, systems perform unnecessary work, leading to inefficiencies that become more pronounced with increased usage and complexity.

How RPC Caching Works: Principles and Best Practices

To combat redundant requests, a caching layer is introduced between the application and the RPC provider. This layer intercepts outgoing RPC calls and, if configured correctly, can serve responses much faster and without incurring additional provider costs. The general mechanism involves:

  1. Request Interception: The caching layer receives an RPC request from the application.
  2. Cache Lookup: It checks if a valid, unexpired response for that exact request (method and parameters) already exists in its local storage (the cache).
  3. Cache Hit: If a valid response is found (a "cache hit"), the cached data is immediately returned to the application, bypassing the upstream RPC provider entirely.
  4. Cache Miss: If no valid response is found (a "cache miss"), the request is forwarded to the actual RPC provider. Once the provider responds, the caching layer stores this response in its cache for a specified duration and then forwards it to the application.

The critical component in caching is the Time-To-Live (TTL). This defines how long a cached response is considered fresh and valid. Properly configured TTLs are essential: a block number, which changes rapidly, would require a very short TTL, while an immutable contract's eth_call for a configuration parameter could have a much longer TTL. The primary trade-off in caching is between data freshness and performance/cost. Aggressive caching with long TTLs boosts performance and reduces costs but increases the risk of serving stale data. Conversely, short TTLs ensure high freshness but reduce caching efficiency.

Developers can concretely benefit from this by:

NodeCache: A Tailored Solution for Ethereum RPC

For developers seeking to manage their interaction with Ethereum, NodeCache provides a dedicated caching layer specifically designed for read-only EVM RPC calls. NodeCache is built to intercept and cache responses for a select set of read-only JSON-RPC methods, including eth_call, eth_getBalance, eth_getCode, eth_getLogs, eth_blockNumber, and eth_chainId. It operates by storing the responses to these calls and serving them directly from its cache when subsequent identical requests are made within their defined Time-To-Live (TTL) period. This means that if your application requests the same token balance twice within a short timeframe, and the data hasn't expired from the cache, NodeCache will serve the cached response from its cache, preventing the request from reaching your upstream RPC provider again.

Crucially, NodeCache implements method-appropriate TTLs, allowing for granular control over how long different types of data are considered fresh. For instance, eth_blockNumber might have a shorter TTL than a contract's eth_call for an immutable configuration parameter. Today, NodeCache focuses its capabilities on Ethereum mainnet, providing specialized caching for this environment. It's important to note that NodeCache exclusively handles read-only requests and does not proxy or cache state-changing methods, such as transactions. By serving cached responses, NodeCache functions as an EVM RPC caching layer, preventing redundant read-only JSON-RPC calls from reaching the underlying RPC provider.

Frequently Asked Questions

What problem does NodeCache solve for Ethereum developers?

NodeCache addresses the issue of applications repeatedly fetching the same read-only data from Ethereum RPC providers. By caching these responses, it prevents redundant read-only JSON-RPC calls from reaching the provider.

Which types of Ethereum RPC calls does NodeCache cache?

NodeCache caches responses for specific read-only JSON-RPC methods, including eth_call, eth_getBalance, eth_getCode, eth_getLogs, eth_blockNumber, and eth_chainId.

How does NodeCache ensure data freshness?

NodeCache uses method-appropriate Time-To-Live (TTL) periods for cached responses. This allows for granular control over how long different types of data are considered fresh, balancing performance with data up-to-dateness.

Does NodeCache support all EVM-compatible chains?

Currently, NodeCache focuses its capabilities on Ethereum mainnet, providing specialized caching for this environment.

If your application is constantly re-fetching static or slowly changing blockchain data, NodeCache offers an EVM RPC caching layer for your read-only Ethereum interactions. Explore how NodeCache can manage your backend operations for accessing Ethereum data.

Optimize your Ethereum RPC calls and reduce redundant requests with NodeCache.

ethereum rpc · rpc caching · nodecache · blockchain data · web3 development · evm · dapps · read-only rpc · ethereum mainnet

Related Articles

All NodeCache EVM articles → · NodeCache EVM documentation →