# IGrainDirectoryCache.Remove(GrainId)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.runtime.graindirectory.igraindirectorycache/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.runtime.graindirectory.igraindirectorycache/methods/)

```csharp
public abstract bool Remove(GrainId key)
```

Removes an entry from the cache given its key

### Parameters

- `key` (`GrainId`): key to remove

### Returns

True if the entry was in the cache and the removal was successful
