Deleting All Data from Cache

Using the official SDK is the recommended way to delete all cache keys.

Deleting All Cache Keys Using the SDK

DELETE
https://{your-project-name}.api.fireboost.io/v1/cache/delete-all

use FireboostIO\SDK\CacheManager;
use FireboostIO\SDK\Adapter\SessionAdapter;

// Create a CacheManager instance with default SessionAdapter
$apiKey = 'your-api-key'; // Or set FIREBOOST_API_KEY environment variable
$cacheManager = new CacheManager(new SessionAdapter(), $apiKey);

// Delete all data from cache
$cacheManager->deleteAllCache();

Deleting All Cache Keys Using the API

This solution is ideal if you want to handle resource deletion manually through the API.

Once you have the JWT token, set it in the client and use that client to call the delete-all endpoint.

DELETE
https://{your-project-name}.api.fireboost.io/v1/cache/delete-all
use FireboostIO\Model\SetInput;

$jwt = 'eyJhbGciOiJIUzI1NiIsInR5cCI6Ik...';

$config = new Configuration();
$config->setAccessToken($jwt);
$config->setApiKeyPrefix('bearer', 'Bearer');
$api = new FireboostIO\Api\FireboostApi(null, $config);

$response = $api->deleteAllCache();

Was this page helpful?