定制 jamiemufu/cloud-flare-purger 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jamiemufu/cloud-flare-purger

Composer 安装命令:

composer require jamiemufu/cloud-flare-purger

包简介

Cloud Flare Cache Purger

README 文档

README

This package will you allow you to purge the cache of specific URLS or purge everything from an API request rather than logging into Cloud Flare and purging from the menu. This package works well with WebHook - for instance if content get's updated and your get notified via web-hook. You can immedatiatly and programmatically clear the cache for the page where content was updated.

Installation

Navigate to root of project (or whever your composer.json is)

composer require jamiemufu/cloud-flare-purger:dev-main

Get your Token and SiteID from Cloud Flare

Log into Cloud Flare and click on your profile - or issue a token to another user.

https://developers.cloudflare.com/api/tokens/create

Get the ZoneID for the site on Cloud Flare - This can be found by clicking 'Overview' on your site in Cloud Flare.

Verify your token

Check if you have a valid token

$request = new CloudFlarePurger('your_token', 'your_zone_id);

$request->verifyToken();

Purge the whole site

$request = new CloudFlarePurger('your_token', 'your_zone_id);

$request->purgeAll();

Purge specific URL's

Pass an array of URL's to CloudFlarePurger

$urls = [
  'https://example.com',
  'https://example.com/1'
];

$request = new CloudFlarePurger('your_token', 'your_zone_id);

$request->purgeUrls($urls);

Or pass a single in the array

$urls = [
  'https://example.com',
];

$request = new CloudFlarePurger('your_token', 'your_zone_id);

$request->purgeUrls($urls);

统计信息

  • 总下载量: 8
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2020-11-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固