> Documentation index: https://www.gooddata.ai/docs/gooddata-ui/llms.txt lists every page of these docs as Markdown.

# clearInsightViewCacheForInsight()

- Package: [@gooddata/sdk-ui-ext](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-ext/index.md)
- Kind: function
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.64/libs/sdk-ui-ext/src/dataLoaders/index.ts

Clears the cached definition of a single insight used by the InsightView components.

**Signature:**

```typescript
export declare function clearInsightViewCacheForInsight(workspace: string, ref: ObjRef): void;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| workspace | string | the workspace the insight belongs to |
| ref | [ObjRef](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.objref/index.md) | the ref of the insight whose cached definition should be dropped |

**Returns:**

void

## Remarks

Use this after an insight has been edited, so that the next render fetches the new definition. To clear every cache at once, use [clearInsightViewCaches()](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-ext/sdk-ui-ext.clearinsightviewcaches/index.md).
