mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02: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:
committed by
Andreas Kling
parent
42eaea1043
commit
163e8e5b44
Notes:
github-actions[bot]
2025-10-14 11:41:38 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/163e8e5b440 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6435
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user