Caching

Edge Cache Expiration

put

This endpoint updates the Edge Cache Expiration settings for a CDN resource. Available for small and large resource types.

Path parameters
organization_uuidstring · uuidRequired

The UUID of the organization.

resource_uuidstring · uuidRequired

The ID of the resource to update.

Body
resource_uuidstringRequired

The UUID of the resource.

Example: *****-*****-****-*****
cache_typestring · enumRequired

The cache type, which can be either 'edge' or 'origin'.

Example: edgePossible values:
edge_cache_expiryinteger · min: 1 · max: 365Optional

The duration for which the edge cache is valid. Required when cache_type is 'edge'.

Example: 6
edge_cache_unitstring · enumOptional

The unit of the edge cache duration. Required when cache_type is 'edge'.

Example: dPossible values:
Responses
200
Edge Cache Expiry updated successfully.
application/json
put
PUT /api/v1/cdn/{organization_uuid}/resource/{resource_uuid} HTTP/1.1
Host: cloud.medianova.com
Content-Type: application/json
Accept: */*
Content-Length: 106

{
  "resource_uuid": "*****-*****-****-*****",
  "cache_type": "edge",
  "edge_cache_expiry": 6,
  "edge_cache_unit": "d"
}
200

Edge Cache Expiry updated successfully.

{
  "status": true,
  "data": {}
}

Browser Cache Rules

put

This endpoint updates the browser cache rules for a specific resource. A maximum of 15 rules can be defined.This setting is available in small, large and dynamic(aksela) resource types.

Path parameters
organization_uuidstring · uuidRequired

The UUID of the organization.

resource_uuidstring · uuidRequired

The UUID of the resource to update.

Body
resource_uuidstringRequired

The UUID of the resource.

Example: ****-****-****-***
browser_cache_with_htmlbooleanOptional

Controls whether HTML content is cached by the browser.

Example: false
Responses
200
Browser cache rules updated successfully.
application/json
put
PUT /api/v1/cdn/{organization_uuid}/resource/{resource_uuid} HTTP/1.1
Host: cloud.medianova.com
Content-Type: application/json
Accept: */*
Content-Length: 981

{
  "resource_uuid": "****-****-****-***",
  "browser_cache_rules": [
    {
      "type": "all_files",
      "content": [],
      "priority": 50,
      "cache_mode": "origin",
      "cache_time": 0,
      "directive": [],
      "exact_match": false
    },
    {
      "type": "full_path",
      "content": [
        "/example/images.jpg"
      ],
      "priority": 40,
      "cache_mode": "cache",
      "cache_time": 60,
      "directive": [
        "must-revalidate",
        "public",
        "private"
      ],
      "exact_match": false
    },
    {
      "type": "directory",
      "content": [
        "/test",
        "/test1/"
      ],
      "priority": 100,
      "cache_mode": "no_cache",
      "cache_time": 0,
      "directive": [],
      "exact_match": false
    },
    {
      "type": "file_extension",
      "content": [
        ".png",
        ".jpg"
      ],
      "priority": 30,
      "cache_mode": "cache",
      "cache_time": 30,
      "directive": [
        "must-revalidate",
        "no-cache",
        "no-store",
        "no-transform",
        "public",
        "private",
        "proxy-revalidate"
      ],
      "exact_match": false
    },
    {
      "type": "directory",
      "content": [
        "/sinem/"
      ],
      "priority": 30,
      "cache_mode": "cache",
      "cache_time": 30,
      "directive": [
        "must-revalidate",
        "no-cache",
        "no-store",
        "no-transform",
        "public",
        "private",
        "proxy-revalidate"
      ],
      "exact_match": true
    }
  ],
  "browser_cache_with_html": false
}
200

Browser cache rules updated successfully.

{
  "status": true,
  "data": {}
}

Query String Caching

put

This endpoint updates the query string caching settings for a specific resource. This setting is available in small and dynamic resource types.

Path parameters
organization_uuidstring · uuidRequired

The UUID of the organization.

resource_uuidstring · uuidRequired

The UUID of the resource to update.

Body
resource_uuidstringRequired

The UUID of the resource.

Example: ****-****-****-****
status_qsstring · enumRequired

Controls query string caching behavior.

Example: onPossible values:
status_qs_cache_ignorebooleanRequired

Determines if query string caching should be ignored.

Example: true
status_cqsbooleanRequired

Indicates if caching query string parameters should be enabled.

Example: false
qs_cache_ignore_paramstring[] · max: 25Optional

List of query string parameters to ignore for caching.

Example: ["test"]
Responses
200
Query string caching settings updated successfully.
application/json
put
PUT /api/v1/cdn/{organization_uuid}/resource/{resource_uuid} HTTP/1.1
Host: cloud.medianova.com
Content-Type: application/json
Accept: */*
Content-Length: 138

{
  "resource_uuid": "****-****-****-****",
  "status_qs": "on",
  "status_qs_cache_ignore": true,
  "status_cqs": false,
  "qs_cache_ignore_param": [
    "test"
  ]
}
200

Query string caching settings updated successfully.

{
  "status": true,
  "data": {}
}

ETag verification

put

This setting is available in small, large and dynamic(aksela) resource types.

Path parameters
organization_uuidstringRequired

UUID of the organization

resource_uuidstringRequired

UUID of the resource

Body
status_etag_verificationbooleanRequired

Enables or disables the ETag verification for the resource.

Example: true
Responses
200
Successfully updated the ETag verification setting for the resource.
application/json
put
PUT /api/v1/cdn/{organization_uuid}/resource/{resource_uuid} HTTP/1.1
Host: cloud.medianova.com
Content-Type: application/json
Accept: */*
Content-Length: 33

{
  "status_etag_verification": true
}
200

Successfully updated the ETag verification setting for the resource.

{
  "status": true,
  "data": {}
}

Error Status Code Cache Expiration

put

This setting is available for small, large and Aksela resource types.

Path parameters
organization_uuidstringRequired

UUID of the organization

resource_uuidstringRequired

UUID of the resource

Body
Responses
200
Successfully updated the error status code cache expiration settings for the resource.
application/json
put
PUT /api/v1/cdn/{organization_uuid}/resource/{resource_uuid} HTTP/1.1
Host: cloud.medianova.com
Content-Type: application/json
Accept: */*
Content-Length: 141

{
  "status_code_cache": [
    {
      "status_codes": [
        500,
        501
      ],
      "cache_expiry": 5,
      "cache_unit": "m"
    },
    {
      "status_codes": [
        400
      ],
      "cache_expiry": 1,
      "cache_unit": "m"
    }
  ]
}
200

Successfully updated the error status code cache expiration settings for the resource.

{
  "status": true,
  "data": {}
}

Shared Cache

put

This setting is available for small, large and Aksela resource types.

Path parameters
organization_uuidstringRequired

UUID of the organization

resource_uuidstringRequired

UUID of the resource

Body
status_share_cachestring · enumRequired

Enables or disables the shared cache process. Can be 'default' or 'share'.

Example: sharePossible values:
share_cachestringRequired

The domain information of the resource for which shared cache will be performed.

Example: static-test.mncdn.org
Responses
200
Successfully updated the shared cache settings for the resource.
application/json
put
PUT /api/v1/cdn/{organization_uuid}/resource/{resource_uuid} HTTP/1.1
Host: cloud.medianova.com
Content-Type: application/json
Accept: */*
Content-Length: 68

{
  "status_share_cache": "share",
  "share_cache": "static-test.mncdn.org"
}
200

Successfully updated the shared cache settings for the resource.

{
  "status": true,
  "data": {}
}

Stale Cache

put

This setting is available for small, large and dynamic resource types.

Path parameters
organization_uuidstringRequired

UUID of the organization

resource_uuidstringRequired

UUID of the resource

Body
Responses
200
Successfully updated the stale caching settings for the resource.
application/json
put
PUT /api/v1/cdn/{organization_uuid}/resource/{resource_uuid} HTTP/1.1
Host: cloud.medianova.com
Content-Type: application/json
Accept: */*
Content-Length: 98

{
  "stale_caching": [
    "error",
    "timeout",
    "invalid_header",
    "http_500",
    "http_502",
    "http_503",
    "http_504"
  ]
}
200

Successfully updated the stale caching settings for the resource.

{
  "status": true,
  "data": {}
}

Robots.txt file

put

This setting is available in small and large resource types.

Path parameters
organization_uuidstringRequired

UUID of the organization

resource_uuidstringRequired

UUID of the resource

Body
resource_uuidstringRequired

UUID of the resource

status_robot_txtstring · enumRequired

Status of the robot.txt settings for the resource.

Possible values:
Responses
200
Successfully updated the resource configuration.
application/json
put
PUT /api/v1/cdn/{organization_uuid}/resource/{resource_uuid} HTTP/1.1
Host: cloud.medianova.com
Content-Type: application/json
Accept: */*
Content-Length: 53

{
  "resource_uuid": "text",
  "status_robot_txt": "enabled"
}
200

Successfully updated the resource configuration.

{
  "status": true,
  "data": {}
}

Range Based Caching

put

This setting is available in small and large resource types.

Path parameters
organization_uuidstringRequired

UUID of the organization

resource_uuidstringRequired

UUID of the resource

Body
status_range_based_cachingbooleanRequired

Enables or disables range based caching.

Example: true
Responses
200
Successfully updated the range based caching setting for the resource.
application/json
put
PUT /api/v1/cdn/{organization_uuid}/resource/{resource_uuid} HTTP/1.1
Host: cloud.medianova.com
Content-Type: application/json
Accept: */*
Content-Length: 35

{
  "status_range_based_caching": true
}
200

Successfully updated the range based caching setting for the resource.

{
  "status": true,
  "data": {}
}

Last updated

Was this helpful?