Laravel cloudflare cache package for laravel offers an efficient way to manage cloudflare's cache directly from your Laravel application, streamlining the purge process to ensure your content remains fresh.
You can install the package via composer:
composer require fuelviews/laravel-cloudflare-cache
You can publish the config file with:
php artisan vendor:publish --tag="cloudflare-cache-config"
This is the contents of the published config file:
return [
/**
* Generate zone or global api key.
*
* @see https://dash.cloudflare.com/profile/api-tokens
*/
'api_key' => env('CLOUDFLARE_CACHE_API_KEY'),
/**
* The zone_id of your site on cloudflare dashboard.
*/
'identifier' => env('CLOUDFLARE_CACHE_ZONE_ID'),
/**
* Debug mode.
*/
'debug' => env('CLOUDFLARE_CACHE_DEBUG', false),
];
Purge everything function with:
use Fuelviews\CloudflareCache\Facades\CloudflareCache;
CloudflareCache::purgeEverything();
Purge everything console command with:
php artisan cloudflare-cache:clear
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
Fuelviews is a web development agency based in Portland, Maine. You'll find an overview of all our projects on our website.
The MIT License (MIT). Please see License File for more information.