cache_reserve
Creates, updates, deletes, gets or lists a cache_reserve resource.
Overview
| Name | cache_reserve |
| Type | Resource |
| Id | cloudflare.cache.cache_reserve |
Fields
The following fields are returned by SELECT queries:
- get
Get Cache Reserve setting response.
| Name | Datatype | Description |
|---|---|---|
id | string | The identifier of the caching setting. (cache_reserve) |
editable | boolean | Whether the setting is editable. |
modified_on | string (date-time) | Last time this setting was modified. |
value | string | Value of the Cache Reserve zone setting. (on, off) (default: off) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | zone_id | Increase cache lifetimes by automatically storing all cacheable files into Cloudflare's persistent object storage buckets. Requires Cache Reserve subscription. Note: using Tiered Cache with Cache Reserve is highly recommended to reduce Reserve operations costs. See the developer docs for more information. | |
edit | update | zone_id, value | Increase cache lifetimes by automatically storing all cacheable files into Cloudflare's persistent object storage buckets. Requires Cache Reserve subscription. Note: using Tiered Cache with Cache Reserve is highly recommended to reduce Reserve operations costs. See the developer docs for more information. | |
get_clear_status | exec | zone_id | You can use Cache Reserve Clear to clear your Cache Reserve, but you must first disable Cache Reserve. In most cases, this will be accomplished within 24 hours. You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind that you cannot undo or cancel this operation. | |
clear | exec | zone_id | You can use Cache Reserve Clear to clear your Cache Reserve, but you must first disable Cache Reserve. In most cases, this will be accomplished within 24 hours. You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind that you cannot undo or cancel this operation. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
zone_id | string | The Cloudflare zone ID. |
SELECT examples
- get
Increase cache lifetimes by automatically storing all cacheable files into Cloudflare's persistent object storage buckets. Requires Cache Reserve subscription. Note: using Tiered Cache with Cache Reserve is highly recommended to reduce Reserve operations costs. See the developer docs for more information.
SELECT
id,
editable,
modified_on,
value
FROM cloudflare.cache.cache_reserve
WHERE zone_id = '{{ zone_id }}' -- required
;
UPDATE examples
- edit
Increase cache lifetimes by automatically storing all cacheable files into Cloudflare's persistent object storage buckets. Requires Cache Reserve subscription. Note: using Tiered Cache with Cache Reserve is highly recommended to reduce Reserve operations costs. See the developer docs for more information.
UPDATE cloudflare.cache.cache_reserve
SET
value = '{{ value }}'
WHERE
zone_id = '{{ zone_id }}' --required
AND value = '{{ value }}' --required
RETURNING
errors,
messages,
result,
success;
Lifecycle Methods
- get_clear_status
- clear
You can use Cache Reserve Clear to clear your Cache Reserve, but you must first disable Cache Reserve. In most cases, this will be accomplished within 24 hours. You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind that you cannot undo or cancel this operation.
EXEC cloudflare.cache.cache_reserve.get_clear_status
@zone_id='{{ zone_id }}' --required
;
You can use Cache Reserve Clear to clear your Cache Reserve, but you must first disable Cache Reserve. In most cases, this will be accomplished within 24 hours. You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind that you cannot undo or cancel this operation.
EXEC cloudflare.cache.cache_reserve.clear
@zone_id='{{ zone_id }}' --required
;