# Cache

> Data structure for cache. For more information, see Caching.AddCache.

## Definition

* **Type:** Struct
* **Namespace:** [UnityEngine](/engine/6000.6/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule
* **Implements:** [IEquatable\<Cache>](https://learn.microsoft.com/dotnet/api/system.iequatable-1)

```csharp
public struct Cache : IEquatable<Cache>
```

## Remarks

**Note:** The Cache API is not supported in WebGL because AssetBundles are stored in the browser cache for the WebGL platform.

## Properties

| Property                                                                                                          | Description                                                                                                  |
| ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| [expirationDelay](/engine/6000.6/script-reference/unityengine/cache/expirationdelay.md)                           | The number of seconds that an AssetBundle may remain unused in the cache before it is automatically deleted. |
| [index](/engine/6000.6/script-reference/unityengine/cache/index.md)                                               | Returns the index of the cache in the cache list.                                                            |
| [maximumAvailableStorageSpace](/engine/6000.6/script-reference/unityengine/cache/maximumavailablestoragespace.md) | Allows you to specify the total number of bytes that can be allocated for the cache.                         |
| [path](/engine/6000.6/script-reference/unityengine/cache/path.md)                                                 | Returns the path of the cache.                                                                               |
| [readOnly](/engine/6000.6/script-reference/unityengine/cache/readonly.md)                                         | Returns true if the cache is readonly.                                                                       |
| [ready](/engine/6000.6/script-reference/unityengine/cache/ready.md)                                               | Returns true if the cache is ready.                                                                          |
| [spaceFree](/engine/6000.6/script-reference/unityengine/cache/spacefree.md)                                       | Returns the number of currently unused bytes in the cache.                                                   |
| [spaceOccupied](/engine/6000.6/script-reference/unityengine/cache/spaceoccupied.md)                               | Returns the used disk space in bytes.                                                                        |
| [valid](/engine/6000.6/script-reference/unityengine/cache/valid.md)                                               | Returns true if the cache is valid.                                                                          |

## Methods

| Method                                                                        | Description                                                                              |
| ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| [ClearCache](/engine/6000.6/script-reference/unityengine/cache/clearcache.md) | Removes all cached content in the cache that has been cached by the current application. |
