mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-09-18 09:54:36 -04:00
add http cache entry limit options
This commit is contained in:
2 files changed
+11
No files matched your search
@@ -191,6 +191,7 @@ const CommonOptions = .{
|
||||
.{ .name = "log_filter_scopes", .type = log.FilterRule, .multiple = true, .validator = logFilterScopesValidator },
|
||||
.{ .name = "user_agent_suffix", .type = ?[]const u8 },
|
||||
.{ .name = "http_cache_dir", .type = ?[]const u8 },
|
||||
.{ .name = "http_cache_entry_limit", .type = ?u32 },
|
||||
.{ .name = "web_bot_auth_key_file", .type = ?[]const u8 },
|
||||
.{ .name = "web_bot_auth_keyid", .type = ?[]const u8 },
|
||||
.{ .name = "web_bot_auth_domain", .type = ?[]const u8 },
|
||||
@@ -631,6 +632,13 @@ pub fn httpCacheDir(self: *const Config) ?[]const u8 {
|
||||
};
|
||||
}
|
||||
|
||||
pub fn httpCacheEntryLimit(self: *const Config) u32 {
|
||||
return switch (self.mode) {
|
||||
inline .serve, .fetch, .mcp, .agent => |opts| opts.http_cache_entry_limit orelse 1000,
|
||||
else => 1000,
|
||||
};
|
||||
}
|
||||
|
||||
pub fn cookieFile(self: *const Config) ?[]const u8 {
|
||||
return switch (self.mode) {
|
||||
inline .serve, .fetch, .mcp, .agent => |opts| opts.cookie,
|
||||
|
||||
@@ -342,6 +342,9 @@
|
||||
\\ Directory used as a filesystem cache for network resources. Omitting
|
||||
\\ this disables caching.
|
||||
\\ Defaults to no caching.
|
||||
\\ --http-cache-entry-limit <INT>
|
||||
\\ Maximum number of entries that can be stored in the HTTP cache. 0 means no limit.
|
||||
\\ Defaults to 1000.
|
||||
\\ --http-connect-timeout <INT>
|
||||
\\ Time in ms to establish an HTTP connection before timing out. 0 means
|
||||
\\ never.
|
||||
|
||||
Reference in new issue
Block a user