1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:47:34 +00:00

Browser+LibWeb+WebContent: Add action to clear resource cache

This commit is contained in:
Timothy Flynn 2021-03-29 15:31:09 -04:00 committed by Andreas Kling
parent 50a8e0e495
commit 855920fe13
4 changed files with 20 additions and 0 deletions

View file

@ -453,6 +453,13 @@ Tab::Tab(Type type)
m_web_content_view->debug_request("collect-garbage");
}
}));
debug_menu.add_action(GUI::Action::create("Clear cache", { Mod_Ctrl | Mod_Shift, Key_C }, [this](auto&) {
if (m_type == Type::InProcessWebView) {
Web::ResourceLoader::the().clear_cache();
} else {
m_web_content_view->debug_request("clear-cache");
}
}));
auto& help_menu = m_menubar->add_menu("Help");
help_menu.add_action(WindowActions::the().about_action());