> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# D3D12_SHADER_CACHE_MODE

> Defines constants that specify a shader cache's mode.

Defines constants that specify a shader cache's mode.

## Syntax

```cpp theme={null}
typedef enum D3D12_SHADER_CACHE_MODE
{
    D3D12_SHADER_CACHE_MODE_MEMORY = 0,
    D3D12_SHADER_CACHE_MODE_DISK = 0
} D3D12_SHADER_CACHE_MODE
```

## Constants

| Constant                           | Description                                                                                                                                                                                                                                                                                                      |
| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| D3D12\_SHADER\_CACHE\_MODE\_MEMORY | Specifies that there's no backing file for this cache. All stores are discarded when the session object is destroyed.                                                                                                                                                                                            |
| D3D12\_SHADER\_CACHE\_MODE\_DISK   | Specifies that the session is backed by files on disk that persist from run to run unless cleared. For ways to clear a disk cache, see [ID3D12ShaderCacheSession::SetDeleteOnDestroy](/reference/graphics/d3d12/interfaces/id3d12shadercachesession/methods/id3d12shadercachesession_setdeleteondestroy_public). |

## Remarks

## Requirements

**Header:** d3d12\_xs.h or d3d12\_x.h<br />**Library:** d3d12\_xs.lib or d3d12\_x.lib<br />**Supported Platforms**: XBOX Series consoles and XBOX One family

## See Also

* [ID3D12ShaderCacheSession::SetDeleteOnDestroy](/reference/graphics/d3d12/interfaces/id3d12shadercachesession/methods/id3d12shadercachesession_setdeleteondestroy_public)
* [D3D12 shader cache APIs](https://microsoft.github.io/DirectX-Specs/d3d/ShaderCache.html)
