Init function for the transfer region cache
This commit is contained in:
parent
8bf11eecca
commit
b34b02af89
|
@ -31,6 +31,12 @@ impl TransferRegionCache {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn generate_cache(&self, trs: &[Transfer]) {
|
||||
for tr in trs.iter() {
|
||||
self.add_overwrite(tr);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn invalidate(&self, tr: &Transfer) {
|
||||
if let Ok(mut interior) = self.interior.lock() {
|
||||
interior.cache.remove(&tr.id);
|
||||
|
|
Loading…
Reference in New Issue