pub enum CacheTier {
Immutable,
SemiStable,
Volatile,
NeverCache,
}Expand description
Classification of an RPC method’s caching behavior.
Variants§
Immutable
Results that never change (e.g., finalized block data, confirmed tx receipts). Very long TTL (1 hour).
SemiStable
Results that change infrequently (e.g., eth_chainId, eth_getCode).
Medium TTL (5 minutes).
Volatile
Results that change frequently (e.g., eth_blockNumber, eth_gasPrice).
Short TTL (2 seconds).
NeverCache
Write methods and subscription calls. Never cached.
Implementations§
Trait Implementations§
impl Copy for CacheTier
impl Eq for CacheTier
impl StructuralPartialEq for CacheTier
Auto Trait Implementations§
impl Freeze for CacheTier
impl RefUnwindSafe for CacheTier
impl Send for CacheTier
impl Sync for CacheTier
impl Unpin for CacheTier
impl UnsafeUnpin for CacheTier
impl UnwindSafe for CacheTier
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more