mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibHTTP: Place HTTP disk cache log points behind a debug flag
These log points are quite verbose. Before we enable the disk cache by default, let's place them behind a debug flag.
This commit is contained in:
parent
adcf5462af
commit
aae8574d25
Notes:
github-actions[bot]
2025-12-02 11:21:02 +00:00
Author: https://github.com/trflynn89
Commit: aae8574d25
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6991
5 changed files with 26 additions and 18 deletions
|
|
@ -4,6 +4,7 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <AK/Debug.h>
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <LibHTTP/Cache/CacheIndex.h>
|
||||
#include <LibHTTP/Cache/Utilities.h>
|
||||
|
|
@ -68,7 +69,7 @@ ErrorOr<CacheIndex> CacheIndex::create(Database::Database& database)
|
|||
|
||||
if (cache_version != CACHE_VERSION) {
|
||||
if (cache_version != 0)
|
||||
dbgln("\033[31;1mDisk cache version mismatch:\033[0m stored version = {}, new version = {}", cache_version, CACHE_VERSION);
|
||||
dbgln_if(HTTP_DISK_CACHE_DEBUG, "\033[31;1mDisk cache version mismatch:\033[0m stored version = {}, new version = {}", cache_version, CACHE_VERSION);
|
||||
|
||||
// FIXME: We should more elegantly handle minor changes, i.e. use ALTER TABLE to add fields to CacheIndex.
|
||||
auto delete_cache_index_table = TRY(database.prepare_statement("DROP TABLE IF EXISTS CacheIndex;"sv));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue