pyra_types/cache.rs
1use serde::{Deserialize, Serialize};
2
3/// Generic cache wrapper for Redis-stored account data.
4///
5/// The indexer writes accounts to Redis wrapped in this struct,
6/// with the account data and the Solana slot at which it was last updated.
7#[derive(Serialize, Deserialize, Clone, Debug)]
8pub struct Cache<T> {
9 pub account: T,
10 #[serde(default)]
11 pub last_updated_slot: u64,
12}