diff options
Diffstat (limited to 'zenserver/config.h')
| -rw-r--r-- | zenserver/config.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/zenserver/config.h b/zenserver/config.h index 19fba71a3..97f339a0e 100644 --- a/zenserver/config.h +++ b/zenserver/config.h @@ -55,9 +55,34 @@ struct ZenUpstreamCacheConfig bool StatsEnabled = false; }; +struct ZenCacheEvictionPolicy +{ + bool Enabled = true; + uint64_t DiskSizeLimit = ~uint64_t(0); + uint64_t MemorySizeLimit = 1024 * 1024 * 1024; +}; + +struct ZenCasEvictionPolicy +{ + bool Enabled = true; + bool ContainerGcEnabled = true; + uint64_t LargeStrategySizeLimit = ~uint64_t(0); + uint64_t SmallStrategySizeLimit = ~uint64_t(0); + uint64_t TinyStrategySizeLimit = ~uint64_t(0); +}; + +struct ZenGcConfig +{ + ZenCasEvictionPolicy Cas; + ZenCacheEvictionPolicy Cache; + int32_t IntervalSeconds = 60 * 60; + bool Enabled = true; +}; + struct ZenServerOptions { ZenUpstreamCacheConfig UpstreamCacheConfig; + ZenGcConfig GcConfig; std::filesystem::path DataDir; // Root directory for state (used for testing) std::filesystem::path ContentDir; // Root directory for serving frontend content (experimental) std::filesystem::path AbsLogFile; // Absolute path to main log file |