cloudflare
Version:
The official TypeScript library for the Cloudflare API
30 lines • 1.34 kB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from 'cloudflare/resource';
export class BrowserCacheTTL extends APIResource {
/**
* Browser Cache TTL (in seconds) specifies how long Cloudflare-cached resources
* will remain on your visitors' computers. Cloudflare will honor any larger times
* specified by your server.
* (https://support.cloudflare.com/hc/en-us/articles/200168276).
*/
edit(params, options) {
const { zone_id, ...body } = params;
return this._client.patch(`/zones/${zone_id}/settings/browser_cache_ttl`, {
body,
...options,
})._thenUnwrap((obj) => obj.result);
}
/**
* Browser Cache TTL (in seconds) specifies how long Cloudflare-cached resources
* will remain on your visitors' computers. Cloudflare will honor any larger times
* specified by your server.
* (https://support.cloudflare.com/hc/en-us/articles/200168276).
*/
get(params, options) {
const { zone_id } = params;
return this._client.get(`/zones/${zone_id}/settings/browser_cache_ttl`, options)._thenUnwrap((obj) => obj.result);
}
}
(function (BrowserCacheTTL) {
})(BrowserCacheTTL || (BrowserCacheTTL = {}));
//# sourceMappingURL=browser-cache-ttl.mjs.map