use std::ops::DerefMut;
use crate::easy;
/// Configure how caches are used to speed up various git repository operations
pub trait CacheAccessExt: easy::Access + Sized {
/// Sets the amount of space used at most for caching most recently accessed fully decoded objects, to `Some(bytes)`,
/// or `None` to deactivate it entirely.
///
/// Note that it is unset by default well but can be enabled once there is time for performance optimization.
/// Well-chosen cache sizes can improve performance particularly if objects are accessed multiple times in a row.
/// The cache is configured to grow gradually.
///
/// Note that a cache on application level should be considered as well as the best object access is not doing one.
///
/// Returns the previous cache size.
fn object_cache_size(&self, bytes: impl Into