承接 kenshodigital/kirby-cloudflare-cache 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

kenshodigital/kirby-cloudflare-cache

Composer 安装命令:

composer require kenshodigital/kirby-cloudflare-cache

包简介

Provides Cloudflare Cache integration for Kirby projects.

README 文档

README

Provides Cloudflare Cache integration for Kirby projects.

General

If you’re proxying a website through Cloudflare, static assets are already cached in most cases. HTML pages aren’t cached by default, though. While this can be easily enabled with a basic Cache Rule in Cloudflare, the CDN has no way to tell what pages are actually considered cacheable by Kirby’s standards, or when content has been updated in the CMS. It simply caches every page until the cache gets manually purged again or expires.

The plugin provides a custom cache driver intended to be used for Kirby’s page cache. This leverages Kirby’s core logic for determining what pages are cacheable and when to flush the cache. Instead of actually caching a page on the file system or in some key-value store, the cache driver only sends the appropriate Cloudflare headers, and leaves the caching itself to the CDN.

It also takes care of purging the cache via API when appropriate, making the overall caching behavior consistent with Kirby’s built-in page cache.

Further reading

Usage

Installation

composer require kenshodigital/kirby-cloudflare-cache ^1.0

Setup

Cloudflare

As mentioned, the domain has to be proxied through Cloudflare and a cache rule needs to be set up to actually cache all eligible responses, including HTML pages.

An API token with Cache Purge permission for the domain is also required.

Further reading

Kirby

In your config.php, make sure to enable the page cache, set the cache type to cloudflare, and provide your zone ID along with your API token.

<?php declare(strict_types=1);

return [
	'cache' => [
		'pages' => [
			'active' => true,
			'type' => 'cloudflare',
			'zone' => '***',
			'token' => '***',
		],
	],
];
Further reading

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-07-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固