pub type RpcCache = Cache<String, Value>;
Expand description
Specialized cache for RPC responses
Aliased Type§
pub struct RpcCache { /* private fields */ }
Implementations§
Source§impl RpcCache
impl RpcCache
Sourcepub fn new_rpc_cache() -> Self
pub fn new_rpc_cache() -> Self
Create a new RPC cache with optimized settings
Sourcepub async fn cache_block(&self, identifier: String, block: Value)
pub async fn cache_block(&self, identifier: String, block: Value)
Cache a block by hash or index
Sourcepub async fn cache_transaction(&self, tx_hash: String, transaction: Value)
pub async fn cache_transaction(&self, tx_hash: String, transaction: Value)
Cache a transaction by hash
Sourcepub async fn cache_contract_state(&self, contract_hash: String, state: Value)
pub async fn cache_contract_state(&self, contract_hash: String, state: Value)
Cache contract state
Sourcepub async fn cache_balance(&self, address: String, balance: Value)
pub async fn cache_balance(&self, address: String, balance: Value)
Cache balance information