vertigo-cli 0.11.2

Reactive Real-DOM library with SSR for Rust - packaging/serving tool
Documentation
use std::{
    collections::{BTreeMap, HashMap},
    sync::Arc,
};

use parking_lot::RwLock;
use vertigo::dev::{CallbackId, SsrFetchRequest, SsrFetchResponse};

pub struct FetchCache {
    pub fetch_waiting: HashMap<SsrFetchRequest, Vec<CallbackId>>,
    pub fetch_cache: BTreeMap<SsrFetchRequest, SsrFetchResponse>,
}

impl FetchCache {
    pub fn new() -> Arc<RwLock<FetchCache>> {
        Arc::new(RwLock::new(FetchCache {
            fetch_waiting: HashMap::new(),
            fetch_cache: BTreeMap::new(),
        }))
    }
}