# GrainDirectoryOptions Properties

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.configuration.graindirectoryoptions/)

## CacheSize {#cachesize-f2f76f2c}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.configuration.graindirectoryoptions/properties/cachesize-f2f76f2c/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Runtime/Configuration/Options/GrainDirectoryOptions.cs)

```csharp
public int CacheSize
```

Gets or sets the maximum number of grains to cache directory information for.

## CacheTTLExtensionFactor {#cachettlextensionfactor-c05e5743}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.configuration.graindirectoryoptions/properties/cachettlextensionfactor-c05e5743/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Runtime/Configuration/Options/GrainDirectoryOptions.cs)

```csharp
[System.Obsolete(CacheTTLExtensionFactor is deprecated and will be removed in a future version.)]
public double CacheTTLExtensionFactor
```

Gets or sets the factor by which cache entry TTLs should be extended when they are found to be stable.

## CachingStrategy {#cachingstrategy-74eeacf6}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.configuration.graindirectoryoptions/properties/cachingstrategy-74eeacf6/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Runtime/Configuration/Options/GrainDirectoryOptions.cs)

```csharp
public CachingStrategyType CachingStrategy
```

Gets or sets the caching strategy to use. The options are None, which means don't cache directory entries locally; LRU, which indicates that a standard fixed-size least recently used strategy should be used; and Adaptive, which indicates that an adaptive strategy with a fixed maximum size should be used. The LRU strategy is used by default.

## InitialCacheTTL {#initialcachettl-a700f9bd}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.configuration.graindirectoryoptions/properties/initialcachettl-a700f9bd/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Runtime/Configuration/Options/GrainDirectoryOptions.cs)

```csharp
[System.Obsolete(InitialCacheTTL is deprecated and will be removed in a future version.)]
public TimeSpan InitialCacheTTL
```

Gets or sets the initial (minimum) time, in seconds, to keep a cache entry before revalidating.

## LazyDeregistrationDelay {#lazyderegistrationdelay-b1f0c074}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.configuration.graindirectoryoptions/properties/lazyderegistrationdelay-b1f0c074/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Runtime/Configuration/Options/GrainDirectoryOptions.cs)

```csharp
public TimeSpan LazyDeregistrationDelay
```

Gets or sets the time span between when we have added an entry for an activation to the grain directory and when we are allowed to conditionally remove that entry. Conditional deregistration is used for lazy clean-up of activations whose prompt deregistration failed for some reason (e.g., message failure). This should always be at least one minute, since we compare the times on the directory partition, so message delays and clcks skues have to be allowed.

## MaximumCacheTTL {#maximumcachettl-b0467ddb}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.configuration.graindirectoryoptions/properties/maximumcachettl-b0467ddb/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Runtime/Configuration/Options/GrainDirectoryOptions.cs)

```csharp
public TimeSpan MaximumCacheTTL
```

Gets or sets the maximum time, in seconds, to keep a cache entry before revalidating.

## PartitionsPerSilo {#partitionspersilo-0dcb4440}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.configuration.graindirectoryoptions/properties/partitionspersilo-0dcb4440/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Runtime/Configuration/Options/GrainDirectoryOptions.cs)

```csharp
public int PartitionsPerSilo
```

Gets or sets the number of directory partitions per silo.
