PHP Client for Cloudflare API
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.

ParamTypeRequiredDefaultDescription
zoneIdstringYesZone Identifier.
php
$response = $client->cache()->cacheReserve()->get('ZONE_ID');
View this operation on the Cloudflare API Reference

Edit

Turn Cache Reserve on or off for a zone.

ParamTypeRequiredDefaultDescription
zoneIdstringYesZone Identifier.
enabledboolYesWhether Cache Reserve is enabled.
php
$response = $client->cache()->cacheReserve()->edit('ZONE_ID', true);
View this operation on the Cloudflare API Reference

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.

ParamTypeRequiredDefaultDescription
zoneIdstringYesZone Identifier.
php
$response = $client->cache()->cacheReserve()->clear('ZONE_ID');
View this operation on the Cloudflare API Reference

Status

Progress of the most recent Cache Reserve clear.

ParamTypeRequiredDefaultDescription
zoneIdstringYesZone Identifier.
php
$response = $client->cache()->cacheReserve()->status('ZONE_ID');
View this operation on the Cloudflare API Reference
Copyright © 2026