Make reload button clear the network cache.

This commit is contained in:
Josh Matthews 2020-07-27 19:56:53 -04:00
parent fe24fc3068
commit f030162ec3
10 changed files with 50 additions and 1 deletions

View file

@ -361,6 +361,10 @@ impl ResourceThreads {
storage_thread: s,
}
}
pub fn clear_cache(&self) {
let _ = self.core_thread.send(CoreResourceMsg::ClearCache);
}
}
impl IpcSend<CoreResourceMsg> for ResourceThreads {
@ -459,6 +463,8 @@ pub enum CoreResourceMsg {
RemoveHistoryStates(Vec<HistoryStateId>),
/// Synchronization message solely for knowing the state of the ResourceChannelManager loop
Synchronize(IpcSender<()>),
/// Clear the network cache.
ClearCache,
/// Send the service worker network mediator for an origin to CoreResourceThread
NetworkMediator(IpcSender<CustomResponseMediator>, ImmutableOrigin),
/// Message forwarded to file manager's handler