# IEventHubQueueCache Methods

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

## Add(List&lt;EventData&gt;, DateTime) {#add-system-collections-generic-list-azure-messaging-eventhubs-eventdata-system-d-c90f7d2d}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.streaming.eventhubs/orleans.streaming.eventhubs.ieventhubqueuecache/methods/add-system-collections-generic-list-azure-messaging-eventhubs-eventdata-system-d-c90f7d2d/)

```csharp
public abstract List<StreamPosition> Add(List<EventData> message, DateTime dequeueTimeUtc)
```

Add a list of EventHub EventData to the cache.

### Parameters

- `message` (`List<EventData>`)
- `dequeueTimeUtc` (`DateTime`)

## AddCachePressureMonitor(ICachePressureMonitor) {#addcachepressuremonitor-orleans-streaming-eventhubs-icachepressuremonitor-9edd0ec2}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.streaming.eventhubs/orleans.streaming.eventhubs.ieventhubqueuecache/methods/addcachepressuremonitor-orleans-streaming-eventhubs-icachepressuremonitor-9edd0ec2/)

```csharp
public abstract void AddCachePressureMonitor(ICachePressureMonitor monitor)
```

Add cache pressure monitor to the cache's back pressure algorithm

### Parameters

- `monitor` (`ICachePressureMonitor`)

## GetCursor(StreamId, StreamSequenceToken) {#getcursor-orleans-runtime-streamid-orleans-streams-streamsequencetoken-21d7065b}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.streaming.eventhubs/orleans.streaming.eventhubs.ieventhubqueuecache/methods/getcursor-orleans-runtime-streamid-orleans-streams-streamsequencetoken-21d7065b/)

```csharp
public abstract object GetCursor(StreamId streamId, StreamSequenceToken sequenceToken)
```

Get a cursor into the cache to read events from a stream.

### Parameters

- `streamId` (`StreamId`)
- `sequenceToken` (`StreamSequenceToken`)

## Refresh(object, StreamSequenceToken) {#refresh-object-orleans-streams-streamsequencetoken-229079a1}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.streaming.eventhubs/orleans.streaming.eventhubs.ieventhubqueuecache/methods/refresh-object-orleans-streams-streamsequencetoken-229079a1/)

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

```csharp
public virtual void Refresh(object cursor, StreamSequenceToken sequenceToken)
```

Refreshes an inactive cursor at the provided sequence token.

### Parameters

- `cursor` (`object`): The cursor to refresh.
- `sequenceToken` (`StreamSequenceToken`): The sequence token to position the cursor at.

## SignalPurge {#signalpurge-fe8f7bf9}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.streaming.eventhubs/orleans.streaming.eventhubs.ieventhubqueuecache/methods/signalpurge-fe8f7bf9/)

```csharp
public abstract void SignalPurge()
```

Send purge signal to the cache, the cache will perform a time based purge on its cached messages

## TryGetNextMessage(object, IBatchContainer) {#trygetnextmessage-object-out-orleans-streams-ibatchcontainer-ca3ef8c8}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.streaming.eventhubs/orleans.streaming.eventhubs.ieventhubqueuecache/methods/trygetnextmessage-object-out-orleans-streams-ibatchcontainer-ca3ef8c8/)

```csharp
public abstract bool TryGetNextMessage(object cursorObj, out IBatchContainer message)
```

Try to get the next message in the cache for the provided cursor.

### Parameters

- `cursorObj` (`object`)
- `message` (`IBatchContainer`)
