[Yandex Cloud documentation](../../../index.md) > [Yandex Cloud CDN](../../index.md) > [Step-by-step guides](../index.md) > Resources > Prefetching files to the CDN server cache

# Forced file upload to the CDN server cache

In the [CDN resource](../../concepts/resource.md) settings, you can [enable content caching](../../concepts/caching.md) to temporarily store the copies of files loaded from [origins](../../concepts/origins.md) on [CDN servers](../../concepts/points-of-presence.md).

At the same time, you can [forcibly upload](../../concepts/caching.md#prefetch) files from origins to the CDN server cache. We recommend prefetching large files, i.e., those of 200 MB or more.

To forcibly upload content from a CDN resource to the CDN server cache:

{% note warning %}

You can only prefetch the cache for content that is not yet available on CDN servers. To update cached files, you need to [purge the cache](../../concepts/caching.md#purge) first.

{% endnote %}

{% list tabs group=instructions %}

- Management console {#console}

  1. In the [management console](https://console.yandex.cloud), select the folder where your [resource](../../concepts/resource.md) is located.
  1. Navigate to **Cloud CDN**.
  1. Click the resource name.
  1. Navigate to the **Content** tab.
  1. In the top-right corner, click ![image](../../../_assets/console-icons/ellipsis.svg) and select **Preload content**.
  1. Enter the file names in the **File path** field.
  1. Click **Preload content**.

- CLI {#cli}

  If you do not have the Yandex Cloud CLI yet, [install and initialize it](../../../cli/quickstart.md#install).

  The folder used by default is the one specified when [creating](../../../cli/operations/profile/profile-create.md) the CLI profile. To change the default folder, use the `yc config set folder-id <folder_ID>` command. You can also specify a different folder for any command using `--folder-name` or `--folder-id`. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.

  1. View the description of the CLI command to update a resource:

      ```bash
      yc cdn resource update --help
      ```
  1. Get a list of all resources in the default folder:

      ```bash
      yc cdn resource list --format yaml
      ```

      Result:

      ```text
      id: s0me1dkfjq********
      folder_id: s0mef01der7p********
      cname: testexample.com
      created_at: "2022-01-19T09:23:57.921365Z"
      updated_at: "2022-01-19T10:55:30.305141Z"
      active: true
      options:
        edge_cache_settings:
          enabled: true
          default value: "345600"
        cache_http_headers:
          enabled: true
          value:
          - content-type
          - content-length
          - connection
          - server
          - date
          - test
        stale:
          enabled: true
          value:
          - error
          - updating
        allowed_http_methods:
          value:
          - GET
          - POST
          - HEAD
          - OPTIONS
      origin_group_id: "89783"
      origin_group_name: My origins group
      origin_protocol: HTTP
      ssl_certificate:
        type: DONT_USE
        status: READY
      ```
  1. Specify the paths to the files you want to upload to the CDN server cache as a comma-separated list with no spaces:

      ```bash
      yc cdn cache prefetch --resource-id <resource_ID> \
        --path <file_paths>
      ```

      For more information about the `yc cdn cache prefetch` command, see the [CLI reference](../../../cli/cli-ref/cdn/cli-ref/cache/prefetch.md).

- API {#api}

  Use the [prefetch](../../api-ref/Cache/prefetch.md) REST API method for the [Cache](../../api-ref/Cache/index.md) resource or the [CacheService/Prefetch](../../api-ref/grpc/Cache/prefetch.md) gRPC API call.

{% endlist %}