# TimePurgePredicate Constructors

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.providers.streams.common.timepurgepredicate/)

## TimePurgePredicate(TimeSpan, TimeSpan) {#constructor-system-timespan-system-timespan-0ab82009}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.providers.streams.common.timepurgepredicate/constructors/constructor-system-timespan-system-timespan-0ab82009/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Streaming/Common/PooledCache/TimePurgePredicate.cs#L19-L23)

```csharp
public TimePurgePredicate(TimeSpan minTimeInCache, TimeSpan maxRelativeMessageAge)
```

Initializes a new instance of the [TimePurgePredicate](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.providers.streams.common.timepurgepredicate/) class.

### Parameters

- `minTimeInCache` (`TimeSpan`): The minimum time data should be kept in cache, unless purged due to data size.
- `maxRelativeMessageAge` (`TimeSpan`): The maximum age of data to keep in the cache.
