Skip to main content

cache_reserve

Creates, updates, deletes, gets or lists a cache_reserve resource.

Overview

Namecache_reserve
TypeResource
Idcloudflare.cache.cache_reserve

Fields

The following fields are returned by SELECT queries:

Get Cache Reserve setting response.

NameDatatypeDescription
idstringThe identifier of the caching setting. (cache_reserve)
editablebooleanWhether the setting is editable.
modified_onstring (date-time)Last time this setting was modified.
valuestringValue of the Cache Reserve zone setting. (on, off) (default: off)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectzone_idIncrease 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.
editupdatezone_id, valueIncrease 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_statusexeczone_idYou 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.
clearexeczone_idYou 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.

NameDatatypeDescription
zone_idstringThe Cloudflare zone ID.

SELECT examples

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

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

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
;