mirror of
https://github.com/servo/servo.git
synced 2025-09-30 00:29:14 +01:00
Make reload button clear the network cache.
This commit is contained in:
parent
fe24fc3068
commit
f030162ec3
10 changed files with 50 additions and 1 deletions
|
@ -902,4 +902,9 @@ impl HttpCache {
|
|||
// See A cache MAY complete a stored incomplete response by making a subsequent range request
|
||||
// https://tools.ietf.org/html/rfc7234#section-3.1
|
||||
}
|
||||
|
||||
/// Clear the contents of this cache.
|
||||
pub fn clear(&mut self) {
|
||||
self.entries.clear();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -354,6 +354,9 @@ impl ResourceChannelManager {
|
|||
CoreResourceMsg::Synchronize(sender) => {
|
||||
let _ = sender.send(());
|
||||
},
|
||||
CoreResourceMsg::ClearCache => {
|
||||
http_state.http_cache.write().unwrap().clear();
|
||||
},
|
||||
CoreResourceMsg::ToFileManager(msg) => self.resource_manager.filemanager.handle(msg),
|
||||
CoreResourceMsg::Exit(sender) => {
|
||||
if let Some(ref config_dir) = self.config_dir {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue