Type Alias RpcCache

Source
pub type RpcCache = Cache<String, Value>;
Expand description

Specialized cache for RPC responses

Aliased Type§

pub struct RpcCache { /* private fields */ }

Implementations§

Source§

impl RpcCache

Source

pub fn new_rpc_cache() -> Self

Create a new RPC cache with optimized settings

Source

pub async fn cache_block(&self, identifier: String, block: Value)

Cache a block by hash or index

Source

pub async fn cache_transaction(&self, tx_hash: String, transaction: Value)

Cache a transaction by hash

Source

pub async fn cache_contract_state(&self, contract_hash: String, state: Value)

Cache contract state

Source

pub async fn cache_balance(&self, address: String, balance: Value)

Cache balance information