Interface ISchemaRegistryCacheBuilder
Defines cache configuration methods for a Schema Registry builder.
public interface ISchemaRegistryCacheBuilder
- Extension Methods
Methods
CacheCapacity(int)
Sets the maximum number of schemas to cache locally.
IConfluentSchemaRegistryBuilder CacheCapacity(int capacity)
Parameters
capacityintThe cache capacity. Default is 1000.
Returns
- IConfluentSchemaRegistryBuilder
The builder for fluent chaining.
Exceptions
- ArgumentOutOfRangeException
Thrown when
capacityis not positive.
CacheSchemas(bool)
Enables or disables local schema caching.
IConfluentSchemaRegistryBuilder CacheSchemas(bool enable = true)
Parameters
enableboolWhether to cache schemas. Default is true.
Returns
- IConfluentSchemaRegistryBuilder
The builder for fluent chaining.
Remarks
Caching improves performance by avoiding repeated network calls to the registry.
RequestTimeout(TimeSpan)
Sets the timeout for Schema Registry HTTP requests.
IConfluentSchemaRegistryBuilder RequestTimeout(TimeSpan timeout)
Parameters
timeoutTimeSpanThe request timeout. Default is 30 seconds.
Returns
- IConfluentSchemaRegistryBuilder
The builder for fluent chaining.
Exceptions
- ArgumentOutOfRangeException
Thrown when
timeoutis not positive.