mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-19 07:33:20 +00:00
LibWebView+RequestServer: Support clearing the HTTP disk cache
This is a bit of a blunt hammer, but this hooks an action to clear the HTTP disk cache into the existing Clear Cache action. Upon invocation, it stops all existing cache entries from making further progress, and then deletes the entire cache index and all cache files. In the future, we will of course want more fine-grained control over cache deletion, e.g. via an about:history page.
This commit is contained in:
parent
42eaea1043
commit
163e8e5b44
Notes:
github-actions[bot]
2025-10-14 11:41:38 +00:00
Author: https://github.com/trflynn89
Commit: 163e8e5b44
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6435
10 changed files with 84 additions and 10 deletions
|
@ -824,7 +824,10 @@ void Application::initialize_actions()
|
|||
m_debug_menu->add_separator();
|
||||
|
||||
m_debug_menu->add_action(Action::create("Collect Garbage"sv, ActionID::CollectGarbage, debug_request("collect-garbage"sv)));
|
||||
m_debug_menu->add_action(Action::create("Clear Cache"sv, ActionID::ClearCache, debug_request("clear-cache"sv)));
|
||||
m_debug_menu->add_action(Action::create("Clear Cache"sv, ActionID::ClearCache, [this, clear_memory_cache = debug_request("clear_cache")]() {
|
||||
m_request_server_client->async_clear_cache();
|
||||
clear_memory_cache();
|
||||
}));
|
||||
m_debug_menu->add_action(Action::create("Clear All Cookies"sv, ActionID::ClearCookies, [this]() { m_cookie_jar->clear_all_cookies(); }));
|
||||
m_debug_menu->add_separator();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue