Purge Cache API Documentation


BaseUrl
https://purge-cache.taskcluster.net/v1

The purge-cache service, typically available at purge-cache.taskcluster.net, is responsible for publishing a pulse message for workers, so they can purge cache upon request.

This document describes the API end-point for publishing the pulse message. This is mainly intended to be used by tools.

Functions

Using the APIs
SignatureSummary
purgeCache(provisionerId, workerType, payload) : voidPurge Worker Cache
allPurgeRequests({continuationToken, limit}) : resultAll Open Purge Requests
purgeRequests(provisionerId, workerType, {since}) : resultOpen Purge Requests for a provisionerId/workerType pair
ping() : voidPing Server

Purge Worker Cache

Method
post
Route
/purge-cache/<provisionerId>/<workerType>
Scopes
purge-cache:<provisionerId>/<workerType>:<cacheName>
Signature
purgeCache(provisionerId, workerType, payload) : void
Stability
stable

Publish a purge-cache message to purge caches named cacheName with provisionerId and workerType in the routing-key. Workers should be listening for this message and purge caches when they see it.

Request Payload

Purge Cache Request (source)

Request that a message be published to purge a specific cache.

cacheNamestring

Name of cache to purge. Notice that if a workerType have multiple kinds of caches (with independent names), it should purge all caches identified by cacheName regardless of cache type.



All Open Purge Requests

Method
get
Route
/purge-cache/list
Signature
allPurgeRequests({continuationToken, limit}) : result
Stability
stable

This is useful mostly for administors to view the set of open purge requests. It should not be used by workers. They should use the purgeRequests endpoint that is specific to their workerType and provisionerId.

Response

Open All Purge Requests List (source)

A list of currently open purge-cache requests. Should not be used by workers.

continuationTokenstring

Passed back from Azure to allow us to page through long result sets.

requestsArray of

A simple list of purge-cache requests.

provisionerIdstring

ProvisionerId associated with the workerType.

workerTypestring

Workertype cache exists on.

cacheNamestring

Name of cache to purge.

beforestringdate-time

All caches that match this provisionerId, workerType, and cacheName must be destroyed if they were created before this time.



Open Purge Requests for a provisionerId/workerType pair

Method
get
Route
/purge-cache/<provisionerId>/<workerType>
Signature
purgeRequests(provisionerId, workerType, {since}) : result
Stability
stable

List of caches that need to be purged if they are from before a certain time. This is safe to be used in automation from workers.

Response

Open Purge Request List (source)

A list of currently open purge-cache requests.

cacheHitboolean

True if the cache has been used in this request.

requestsArray of

A simple list of purge-cache requests.

provisionerIdstring

ProvisionerId associated with the workerType.

workerTypestring

Workertype cache exists on.

cacheNamestring

Name of cache to purge.

beforestringdate-time

All caches that match this provisionerId, workerType, and cacheName must be destroyed if they were created before this time.



Ping Server

Method
get
Route
/ping
Signature
ping() : void
Stability
stable

Respond without doing anything. This endpoint is used to check that the service is up.