public class PurgeCache extends TaskclusterRequestHandler
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.
Modifier and Type | Field and Description |
---|---|
protected static String |
defaultBaseURL |
Constructor and Description |
---|
PurgeCache() |
PurgeCache(Credentials credentials) |
PurgeCache(Credentials credentials,
String baseURL) |
PurgeCache(String baseURL) |
PurgeCache(String clientId,
String accessToken) |
PurgeCache(String clientId,
String accessToken,
String certificate) |
Modifier and Type | Method and Description |
---|---|
CallSummary<EmptyPayload,OpenAllPurgeRequestsList> |
allPurgeRequests()
This is useful mostly for administors to view the set of open purge requests.
|
CallSummary<EmptyPayload,EmptyPayload> |
ping()
Respond without doing anything.
|
CallSummary<PurgeCacheRequest,EmptyPayload> |
purgeCache(String provisionerId,
String workerType,
PurgeCacheRequest payload)
Publish a purge-cache message to purge caches named
cacheName with provisionerId and workerType in the routing-key. |
CallSummary<EmptyPayload,OpenPurgeRequestList> |
purgeRequests(String provisionerId,
String workerType)
List of caches that need to be purged if they are from before a certain time.
|
apiCall, setBaseURL, uriEncode
protected static final String defaultBaseURL
public PurgeCache(Credentials credentials)
public PurgeCache(Credentials credentials, String baseURL)
public PurgeCache(String baseURL)
public PurgeCache()
public CallSummary<EmptyPayload,EmptyPayload> ping() throws APICallFailure
Respond without doing anything. This endpoint is used to check that the service is up.
APICallFailure
public CallSummary<PurgeCacheRequest,EmptyPayload> purgeCache(String provisionerId, String workerType, PurgeCacheRequest payload) throws APICallFailure
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.
Required scopes: purge-cache:
APICallFailure
public CallSummary<EmptyPayload,OpenAllPurgeRequestsList> allPurgeRequests() throws APICallFailure
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.
APICallFailure
public CallSummary<EmptyPayload,OpenPurgeRequestList> purgeRequests(String provisionerId, String workerType) throws APICallFailure
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.
Copyright © 2014–2018 Mozilla. All rights reserved.