# ClearCache

> Removes all cached content in the cache that has been cached by the current application.

## Definition

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

## ClearCache()

Removes all cached content in the cache that has been cached by the current application.

```csharp
public bool ClearCache()
```

### Returns

| Type                                                          | Description                                 |
| ------------------------------------------------------------- | ------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Returns True when cache clearing succeeded. |

### Remarks

Returns false if any cached bundle is in use.

## ClearCache(int)

Removes all cached content in the cache that has been cached by the current application.

```csharp
public bool ClearCache(int expiration)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The number of seconds that AssetBundles may remain unused in the cache.

### Returns

| Type                                                          | Description                                 |
| ------------------------------------------------------------- | ------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Returns True when cache clearing succeeded. |

### Remarks

Returns false if any cached bundle is in use.
