mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibWeb: Add some tests that exercise the HTTP disk cache
Our HTTP disk cache is currently manually tested against various sites. This patch adds some tests to cover various scenarios, including non- cacheable responses, expired responses, and revalidation. In order to ensure we hit the disk cache in RequestServer, we must disable the in-memory cache in WebContent.
This commit is contained in:
parent
a4c8e39b99
commit
813986237e
Notes:
github-actions[bot]
2025-11-20 08:35:21 +00:00
Author: https://github.com/trflynn89
Commit: 813986237e
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6861
Reviewed-by: https://github.com/gmta ✅
7 changed files with 353 additions and 0 deletions
|
|
@ -2848,6 +2848,11 @@ void set_http_cache_enabled(bool const enabled)
|
|||
g_http_cache_enabled = enabled;
|
||||
}
|
||||
|
||||
bool http_cache_enabled()
|
||||
{
|
||||
return g_http_cache_enabled;
|
||||
}
|
||||
|
||||
void clear_http_cache()
|
||||
{
|
||||
HTTPCache::the().clear_cache();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue