# CacheFileForIndexingElement

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Reference](https://developer.m-files.com/APIs/gRPC-API/Reference/index.md) > [Messages](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.CacheFileForIndexingElement/

Cache file for indexing element.

- **Full name:** `MFiles.CacheFileForIndexingElement`
- **Proto file:** [`mfiles/structs.proto`](https://developer.m-files.com/APIs/gRPC-API/downloads/proto/mfiles/structs.proto)

<a id="fields"></a>

## Fields

| Field | Type | Number | Description |
|---|---|---|---|
| <a id="f-file_information"></a>`file_information` | [`FileInfoForFIX`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FileInfoForFIX/index.md) | 1 | File info for indexing. |
| <a id="f-file_format"></a>`file_format` | [`FileFormat`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.FileFormat/index.md) | 2 | Specifies the requested file format to cache. Values: `FILE_FORMAT_NATIVE` (0), `FILE_FORMAT_PDF` (1), `FILE_FORMAT_DISPLAY_ONLY_PDF` (2), `FILE_FORMAT_PLAIN_TEXT` (3), `FILE_FORMAT_MARKDOWN` (4). |
| <a id="f-sub_directory"></a>`sub_directory` | `string` | 3 | The optional subdirectory under Filedata\Temp\FIX. |

<a id="used-by-methods"></a>

## Used by methods

- [IRPCIndexingDataSource.CacheFileForIndexingCollective](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCIndexingDataSource/CacheFileForIndexingCollective/index.md): Like CacheFileForIndexing, for up to 20 file versions in one call, processed in parallel.

<a id="used-in-fields"></a>

## Used in fields

- [`CacheFileForIndexingCollectiveRequest.indexing_elements`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCIndexingDataSource/CacheFileForIndexingCollective/index.md#request): The file versions to cache, with an optional subfolder each.
