Yandex Cloud
  • Services
  • Solutions
  • Why Yandex Cloud
  • Pricing
  • Documentation
  • Contact us
Get started
Language / Region
© 2022 Yandex.Cloud LLC
Yandex Cloud CDN
  • Getting started
  • Step-by-step instructions
    • All instructions
    • Resources
      • Creating a resource
      • Editing basic settings of a resource
      • Configuring resource caching
      • Configuring log export
      • Pre-loading files to CDN servers
      • Purging resource cache
      • Configuring request and response headers
      • Configuring CORS for responses to clients
      • Configuring HTTP methods
      • Enabling file compression
      • Enabling file segmentation
      • Enabling origin shielding
      • Disabling a resource
      • Deleting a resource
    • Origin groups
      • Creating an origin group
      • Editing an origin group
      • Connecting an origin group to a resource
      • Deleting an origin group
  • Practical guidelines
    • Publishing game updates
    • Integrating an L7 load balancer with the CDN and Object Storage
    • Blue-green and canary deployment
  • Concepts
    • Service overview
    • Resource
    • Origins and origin groups
    • Exchanging data between clients and the CDN
      • Overview
      • TLS certificates
      • CORS
      • Compressing content
    • Exchanging data between the CDN and origins
      • Overview
      • Host header
      • Segmenting content
      • Origin shielding
    • Caching content
    • Exporting logs
    • Quotas and limits
  • Access management
  • Troubleshooting
  • API reference
    • Authentication in the API
    • gRPC
      • Overview
      • CacheService
      • OriginGroupService
      • OriginService
      • ProviderService
      • RawLogsService
      • ResourceService
      • OperationService
    • REST
      • Overview
      • Cache
        • Overview
        • prefetch
        • purge
      • OriginGroup
        • Overview
        • create
        • delete
        • get
        • list
        • update
      • Origin
        • Overview
        • create
        • delete
        • get
        • list
        • update
      • Provider
        • Overview
        • activate
        • listActivated
      • RawLogs
        • Overview
        • activate
        • deactivate
        • get
        • update
      • Resource
        • Overview
        • create
        • delete
        • get
        • getProviderCName
        • list
        • update
  • Pricing policy
  1. API reference
  2. gRPC
  3. CacheService

CacheService

Written by
Yandex Cloud
  • Calls CacheService
  • Purge
    • PurgeCacheRequest
    • Operation
    • PurgeCacheMetadata
  • Prefetch
    • PrefetchCacheRequest
    • Operation
    • PrefetchCacheMetadata

A set of methods for managing Cache Service resources.

Call Description
Purge Removes specified files from the cache of the specified resource.
Prefetch Uploads specified files from origins to cache of the specified resource.

Calls CacheService

Purge

Removes specified files from the cache of the specified resource. For details about purging, see documentation.
Purging may take up to 15 minutes.

rpc Purge (PurgeCacheRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:PurgeCacheMetadata

    Operation.response:google.protobuf.Empty

PurgeCacheRequest

Field Description
resource_id string
Required. ID of the resource to perform purge operation on. The maximum string length in characters is 50.
paths[] string
Set of paths: Paths of the files to remove from the cache.
You may use asterisk (*) as a wildcard character that substitutes any number of characters.
If an empty array of paths is specified, the cache is purged entirely.

Operation

Field Description
id string
ID of the operation.
description string
Description of the operation. 0-256 characters long.
created_at google.protobuf.Timestamp
Creation timestamp.
created_by string
ID of the user or service account who initiated the operation.
modified_at google.protobuf.Timestamp
The time when the Operation resource was last modified.
done bool
If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.
metadata google.protobuf.Any<PurgeCacheMetadata>
Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any.
result oneof: error or response
The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true, exactly one of error or response is set.
  error google.rpc.Status
The error result of the operation in case of failure or cancellation.
  response google.protobuf.Any<google.protobuf.Empty>
if operation finished successfully.

PurgeCacheMetadata

Field Description
resource_id string
Required. ID of the resource. The maximum string length in characters is 50.

Prefetch

Uploads specified files from origins to cache of the specified resource. For defails about prefetching, see documentation.

rpc Prefetch (PrefetchCacheRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:PrefetchCacheMetadata

    Operation.response:google.protobuf.Empty

PrefetchCacheRequest

Field Description
resource_id string
Required. ID of the resource to perform prefetch operation on. The maximum string length in characters is 50.
paths[] string
Set of paths to prefetch.

Operation

Field Description
id string
ID of the operation.
description string
Description of the operation. 0-256 characters long.
created_at google.protobuf.Timestamp
Creation timestamp.
created_by string
ID of the user or service account who initiated the operation.
modified_at google.protobuf.Timestamp
The time when the Operation resource was last modified.
done bool
If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.
metadata google.protobuf.Any<PrefetchCacheMetadata>
Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any.
result oneof: error or response
The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true, exactly one of error or response is set.
  error google.rpc.Status
The error result of the operation in case of failure or cancellation.
  response google.protobuf.Any<google.protobuf.Empty>
if operation finished successfully.

PrefetchCacheMetadata

Field Description
resource_id string
Required. ID of the resource. The maximum string length in characters is 50.

Was the article helpful?

Language / Region
© 2022 Yandex.Cloud LLC
In this article:
  • Calls CacheService
  • Purge
  • PurgeCacheRequest
  • Operation
  • PurgeCacheMetadata
  • Prefetch
  • PrefetchCacheRequest
  • Operation
  • PrefetchCacheMetadata