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

# Create Cache Rules



## OpenAPI

````yaml https://raw.githubusercontent.com/vidinfra/open-api-docs/refs/heads/main/cdn-openapi.json post /distributions/{distributionID}/cache-rules
openapi: 3.0.1
info:
  title: Default module
  description: ''
  version: 1.0.0
servers:
  - url: https://api.tenbyte.io/v1
    description: Production server
security:
  - apikey-header-X-API-Key: []
tags:
  - name: Distributions
  - name: SSL Certificate Manage
  - name: Origins/Upstreams Manage
  - name: Purge
  - name: Prefetch
  - name: Cache Rules
  - name: Access Rules
  - name: Analytics
  - name: Http Headers
  - name: Verifications
  - name: IP Addresses List
paths:
  /distributions/{distributionID}/cache-rules:
    post:
      tags:
        - Cache Rules
      summary: Create Cache Rules
      parameters:
        - name: distributionID
          in: path
          description: ''
          required: true
          example: da4caf0f-bdea-4e9e-bfee-54763e674e6d
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                pattern:
                  type: string
                ttl_seconds:
                  type: integer
                type:
                  description: prefix
                  type: string
                config:
                  type: object
                  properties:
                    ignore_origin_no_cache:
                      type: boolean
                    ignore_client_no_cache:
                      type: boolean
                    never_cache:
                      type: boolean
                    ignore_query_string_in_cache_key:
                      type: boolean
                    gzip_compression:
                      type: boolean
                  required:
                    - ignore_origin_no_cache
                    - ignore_client_no_cache
                    - never_cache
                    - ignore_query_string_in_cache_key
                    - gzip_compression
              required:
                - name
                - pattern
                - ttl_seconds
                - type
                - config
            example:
              name: Cache, No Cache
              pattern: ./*
              ttl_seconds: 3600
              type: regex
              config:
                ignore_origin_no_cache: false
                ignore_client_no_cache: true
                never_cache: false
                ignore_query_string_in_cache_key: true
                gzip_compression: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties: {}
          headers: {}
      deprecated: false
      security:
        - apikey-header-X-API-Key: []
components:
  securitySchemes:
    apikey-header-X-API-Key:
      type: apiKey
      in: header
      name: X-API-Key

````