# CanCacheInspectorGUI()

> Override this method to determine whether the inspector GUI for your decorator can be cached.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.6/script-reference/unityeditor.md)
* **Assembly:** UnityEditor.CoreModule

> **Warning:**
>
> **Deprecated.** CanCacheInspectorGUI has been deprecated and is no longer used.

```csharp
public virtual bool CanCacheInspectorGUI()
```

### Returns

| Type                                                          | Description                                                 |
| ------------------------------------------------------------- | ----------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Whether the inspector GUI for your decorator can be cached. |

### Remarks

The default is true. If your UI is only using [EditorGUI](/engine/6000.6/script-reference/unityeditor/editorgui.md) controls, it is cacheable. If you're using [Handles](/engine/6000.6/script-reference/unityeditor/handles.md), [GL](/engine/6000.6/script-reference/unityengine/gl.md), or some other method to draw directly into your rect, then you should override this method and return false when your property is visible.
