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
commit 855920fe13
Notes: sideshowbarker 2024-07-18 20:57:57 +09:00
4 changed files with 20 additions and 0 deletions

View file

@ -37,6 +37,7 @@
#include <LibWeb/DOM/Document.h>
#include <LibWeb/Dump.h>
#include <LibWeb/Layout/InitialContainingBlockBox.h>
#include <LibWeb/Loader/ResourceLoader.h>
#include <LibWeb/Page/Frame.h>
#include <WebContent/ClientConnection.h>
#include <WebContent/PageHost.h>
@ -210,6 +211,10 @@ void ClientConnection::handle(const Messages::WebContentServer::DebugRequest& me
m_page_host->set_should_show_line_box_borders(state);
page().main_frame().set_needs_display(page().main_frame().viewport_rect());
}
if (message.request() == "clear-cache") {
Web::ResourceLoader::the().clear_cache();
}
}
void ClientConnection::handle(const Messages::WebContentServer::GetSource&)