fuelviews/laravel-cloudflare-cache

Laravel cloudflare cache package

v0.0.4 2024-06-14 01:37 UTC

This package is auto-updated.

Last update: 2024-11-14 02:39:21 UTC


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

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.