Cache
Cache Reserve
Cache Reserve stores cacheable files in Cloudflare's persistent object storage, so they survive eviction from the edge cache. It requires a paid R2 subscription.
Cache Reserve stores cacheable files in Cloudflare's persistent object storage, so they survive eviction from the edge cache. It requires a paid R2 subscription.
Get
Current Cache Reserve setting for a zone.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
zoneId | string | Yes | Zone Identifier. |
php
$response = $client->cache()->cacheReserve()->get('ZONE_ID');
Edit
Turn Cache Reserve on or off for a zone.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
zoneId | string | Yes | Zone Identifier. | |
enabled | bool | Yes | Whether Cache Reserve is enabled. |
php
$response = $client->cache()->cacheReserve()->edit('ZONE_ID', true);
Clear
Start clearing the Cache Reserve of a zone.
Cache Reserve has to be disabled first, and cannot be re-enabled while
the clear is running. Poll status() for progress.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
zoneId | string | Yes | Zone Identifier. |
php
$response = $client->cache()->cacheReserve()->clear('ZONE_ID');
Status
Progress of the most recent Cache Reserve clear.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
zoneId | string | Yes | Zone Identifier. |
php
$response = $client->cache()->cacheReserve()->status('ZONE_ID');

