Linux 软件免费装
Banner图

Basil

开发者
更新时间 2026年9月12日 01:09
PHP版本: 8.1 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

cache performance static cache full page cache cache rules

下载

0.1.5

详情介绍:

Basil is a full-page cache plugin for site owners who want caching decisions to be explicit and explainable. Its first release is focused on layered cache and bypass rules, local static HTML files, and a minimal early cache-hit path. Basil is fail-open: a request that is unmatched, unsafe, expired, corrupt, or otherwise unsuitable for caching continues through WordPress normally. Rules may match the entire eligible site, exact public content, public post types, built-in categories and their descendants, or case-sensitive URL path globs. Match and exception conditions can be nested with AND and OR groups. When several rules apply, Basil resolves them deterministically by higher priority, greater specificity, and then later creation. Cached anonymous HTML is stored as guarded local files. On a valid warm hit, the standalone advanced-cache.php drop-in serves the final response before WordPress or Composer boots. Logged-in, personalized, query-string, private, non-HTML, and otherwise unsafe responses bypass the cache. The plugin makes no external requests and collects no telemetry. Version 1 supports single-site WordPress installations only. It does not edit cached HTML, optimize HTML/CSS/JavaScript, cache media, warm pages, or use a remote cache service.

安装:

  1. Upload the basil directory to /wp-content/plugins/, or install the ZIP from the Plugins screen.
  2. Activate Basil from the Plugins screen.
  3. Open the Basil dashboard and follow the guided page-cache setup.
  4. Add explicit cache rules. Requests that match no rule bypass the cache.
Activation alone does not edit wp-config.php or install a drop-in. The guided setup asks WordPress for filesystem access. When safe, it creates cache/basil/ under the configured uploads directory, installs Basil's owned advanced-cache.php in the configured content directory, and adds a marked WP_CACHE block near the end of wp-config.php. It leaves an existing WP_CACHE definition and every foreign drop-in unchanged, and explains when manual action is necessary. If another cache plugin leaves Basil's markers stale or incomplete, the dashboard offers a protected repair action. It removes only exact Basil blocks and marker comments while preserving other declarations and plugin settings.

屏幕截图:

  • Rules list showing enabled state, priority, cache action, match conditions, and rule-management controls.
  • Rule settings for the name, priority, enabled state, action, and cache profile.
  • Match-condition editor with condition groups, JSON representation, and optional exceptions.

常见问题:

Why does Basil require WordPress 6.9?

Basil captures completed templates through WordPress's native template enhancement buffer instead of opening its own long-lived output buffer. Sites that opt out of this buffer for streaming, or serve pages outside the normal template lifecycle, continue to work but do not generate cache entries.

Does Basil cache pages immediately after activation?

No. Basil defaults to bypassing every request. Page caching requires guided setup and at least one enabled cache rule.

Does Basil cache pages for logged-in visitors?

No. Basil bypasses requests that contain authentication, session, cart, or other known personalization signals.

Does Basil use a remote service or send telemetry?

No. Version 1 uses the local filesystem and makes no runtime external requests.

What files and configuration can Basil change?

Only the guided setup can add Basil's marked WP_CACHE block and owned advanced-cache.php drop-in. Runtime cache entries stay below cache/basil/ under the configured uploads base. Basil verifies exact ownership markers before removing any of these artifacts.

What happens when another page-cache plugin is active?

Basil reports the likely conflict and does not deactivate the other plugin or overwrite its drop-in. An object-cache.php drop-in is not treated as a page-cache conflict.

What if another cache plugin changes Basil's wp-config.php markers?

Basil reports that WP_CACHE needs repair and offers a protected dashboard button. The repair removes only canonical Basil blocks and exact Basil marker comments. Other WP_CACHE declarations, plugin settings, and unfamiliar configuration remain unchanged.

What happens on deactivation or uninstall?

Deactivation preserves rules but clears cached pages, scheduled cleanup, and only Basil-owned runtime/configuration artifacts. Uninstall also removes Basil's stored rules and private options. Foreign files and configuration are left untouched.

Is multisite supported?

No. Version 1 detects multisite and keeps page caching disabled.

Can I edit generated cache files?

No. Editable final HTML is intentionally deferred. Manual changes to cache entries are unsupported and may make an entry fail validation and bypass.

更新日志:

0.1.5 0.1.4 0.1.3 0.1.2 0.1.1 0.1.0