CachingRuleProcessor(
self,
rules: list[StringNodeRule],
*,
max_entries: int = _MAX_ENTRIES,| Name | Type | Description |
|---|---|---|
rules* | list[StringNodeRule] | Redaction rules, applied in order to every string. |
max_entries | int | Default: _MAX_ENTRIESUpper bound on cached strings. |
max_chars | int | Default: _MAX_CHARS |
| Name | Type |
|---|---|
| rules | list[StringNodeRule] |
| max_entries | int |
| max_chars | int |
Apply secret rules per string and remember the result in a bounded LRU.
The output for a string is the same whether it comes from the cache or from the rules, so the cache cannot let a secret through. Strings too large for the character budget are masked each time and not cached.
Upper bound on characters the cache holds.