Method: AvroTurf::CachedConfluentSchemaRegistry#initialize

Defined in:
lib/avro_turf/cached_confluent_schema_registry.rb

#initialize(upstream, cache: nil) ⇒ CachedConfluentSchemaRegistry

Instantiate a new CachedConfluentSchemaRegistry instance with the given configuration. By default, uses a provided InMemoryCache to prevent repeated calls to the upstream registry.

upstream - The upstream schema registry object that fully responds to all methods in the

AvroTurf::ConfluentSchemaRegistry interface.

cache - Optional user provided Cache object that responds to all methods in the AvroTurf::InMemoryCache interface.



14
15
16
17
# File 'lib/avro_turf/cached_confluent_schema_registry.rb', line 14

def initialize(upstream, cache: nil)
  @upstream = upstream
  @cache = cache || AvroTurf::InMemoryCache.new
end