fuelviews / laravel-cloudflare-cache
Laravel cloudflare cache package
Fund package maintenance!
Fuelviews
Requires
- php: ^8.2
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- guzzlehttp/guzzle: ^7.8
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.1.1||^7.10.0
- orchestra/testbench: ^9.0.0||^8.22.0
- pestphp/pest: ^2.34
- pestphp/pest-plugin-arch: ^2.7
- pestphp/pest-plugin-laravel: ^2.3
README
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.
Installation
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), ];
Usage
Purge everything function with:
use Fuelviews\CloudflareCache\Facades\CloudflareCache; CloudflareCache::purgeEverything();
Purge everything console command with:
php artisan cloudflare-cache:clear
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
Support us
Fuelviews is a web development agency based in Portland, Maine. You'll find an overview of all our projects on our website.
License
The MIT License (MIT). Please see License File for more information.