diff options
| author | zousar <[email protected]> | 2025-03-02 00:15:35 -0700 |
|---|---|---|
| committer | zousar <[email protected]> | 2025-03-02 00:15:35 -0700 |
| commit | 6d07b0437ccb7800652708f76a7ee84e551f43cf (patch) | |
| tree | 15d4ef7c9b69da20ea5da3dc18240d75bb64d17e /src/zenserver/config.cpp | |
| parent | Move utility methods in cachedisklayer (diff) | |
| download | zen-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.cpp | 8 |
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", "", |