# EventHubQueueCache Constructors

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.streaming.eventhubs/orleans.streaming.eventhubs.eventhubqueuecache/)

## EventHubQueueCache(string, int, IObjectPool&lt;FixedSizeBuffer&gt;, IEventHubDataAdapter, IEvictionStrategy, IStreamQueueCheckpointer&lt;string&gt;, ILogger, ICacheMonitor, TimeSpan?, TimeSpan?) {#constructor-string-int-orleans-providers-streams-common-iobjectpool-orleans-prov-5816f5a4}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.streaming.eventhubs/orleans.streaming.eventhubs.eventhubqueuecache/constructors/constructor-string-int-orleans-providers-streams-common-iobjectpool-orleans-prov-5816f5a4/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Azure/Orleans.Streaming.EventHubs/Providers/Streams/EventHub/EventHubQueueCache.cs#L50-L74)

```csharp
public EventHubQueueCache(string partition, int defaultMaxAddCount, IObjectPool<FixedSizeBuffer> bufferPool, IEventHubDataAdapter dataAdapter, IEvictionStrategy evictionStrategy, IStreamQueueCheckpointer<string> checkpointer, ILogger logger, ICacheMonitor cacheMonitor, TimeSpan? cacheMonitorWriteInterval, TimeSpan? metadataMinTimeInCache)
```

EventHub queue cache.

### Parameters

- `partition` (`string`): Partition this instance is caching.
- `defaultMaxAddCount` (`int`): Default max number of items that can be added to the cache between purge calls.
- `bufferPool` (`IObjectPool<FixedSizeBuffer>`): raw data block pool.
- `dataAdapter` (`IEventHubDataAdapter`): Adapts EventData to cached.
- `evictionStrategy` (`IEvictionStrategy`): Eviction strategy manage purge related events
- `checkpointer` (`IStreamQueueCheckpointer<string>`): Logic used to store queue position.
- `logger` (`ILogger`)
- `cacheMonitor` (`ICacheMonitor`)
- `cacheMonitorWriteInterval` (`TimeSpan?`)
- `metadataMinTimeInCache` (`TimeSpan?`)
