aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver/config.cpp
diff options
context:
space:
mode:
authorzousar <[email protected]>2025-03-02 00:15:35 -0700
committerzousar <[email protected]>2025-03-02 00:15:35 -0700
commit6d07b0437ccb7800652708f76a7ee84e551f43cf (patch)
tree15d4ef7c9b69da20ea5da3dc18240d75bb64d17e /src/zenserver/config.cpp
parentMove utility methods in cachedisklayer (diff)
downloadzen-6d07b0437ccb7800652708f76a7ee84e551f43cf.tar.xz
zen-6d07b0437ccb7800652708f76a7ee84e551f43cf.zip
Control overwrite enforcement with a config setting
Diffstat (limited to 'src/zenserver/config.cpp')
-rw-r--r--src/zenserver/config.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/zenserver/config.cpp b/src/zenserver/config.cpp
index 809092378..c8949f5fd 100644
--- a/src/zenserver/config.cpp
+++ b/src/zenserver/config.cpp
@@ -408,6 +408,7 @@ ParseConfigFile(const std::filesystem::path& Path,
LuaOptions.AddOption("cache.enable"sv, ServerOptions.StructuredCacheConfig.Enabled);
LuaOptions.AddOption("cache.writelog"sv, ServerOptions.StructuredCacheConfig.WriteLogEnabled, "cache-write-log"sv);
LuaOptions.AddOption("cache.accesslog"sv, ServerOptions.StructuredCacheConfig.AccessLogEnabled, "cache-access-log"sv);
+ LuaOptions.AddOption("cache.limitoverwrites"sv, ServerOptions.StructuredCacheConfig.LimitOverwrites, "cache-limit-overwrites"sv);
LuaOptions.AddOption("cache.memlayer.sizethreshold"sv,
ServerOptions.StructuredCacheConfig.MemCacheSizeThreshold,
@@ -859,6 +860,13 @@ ParseCliOptions(int argc, char* argv[], ZenServerOptions& ServerOptions)
cxxopts::value<bool>(ServerOptions.StructuredCacheConfig.AccessLogEnabled)->default_value("false"),
"");
+ options.add_option("cache",
+ "",
+ "cache-limit-overwrites",
+ "Whether to require policy flag pattern before allowing overwrites",
+ cxxopts::value<bool>(ServerOptions.StructuredCacheConfig.LimitOverwrites)->default_value("false"),
+ "");
+
options.add_option(
"cache",
"",