// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. using System; namespace Regorus { /// /// Global configuration for compiled pattern caches used by regex and glob builtins. /// public readonly struct CacheConfig { /// /// Initializes a new instance of the struct. /// /// Maximum cached compiled regex patterns (default 256, 0 = disabled). /// Maximum cached compiled glob matchers (default 128, 0 = disabled). public CacheConfig(nuint regex, nuint glob) { Regex = regex; Glob = glob; } /// Maximum cached compiled regex patterns (default 256). public nuint Regex { get; } /// Maximum cached compiled glob matchers (default 128). public nuint Glob { get; } internal Regorus.Internal.RegorusCacheConfig ToNative() { return new Regorus.Internal.RegorusCacheConfig { regex = Regex, glob = Glob, }; } } }