pub fn capacity(&self) -> u64 {
        self.cache
            .as_ref()
            .map_or(0, |cache| cache.policy().max_capacity().unwrap_or(u64::MAX))
    }
Returns the capacity of this cache in bytes.
core/lib/state/src/cache/lru_cache.rs