Basil

Kuvaus

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.

Usage

  1. Open Basil > Rules and create an explicit cache or bypass rule.
  2. Choose a numeric priority. A larger number wins before specificity is
    considered.
  3. Build the required Match tree and, when needed, an Unless tree.
  4. Choose Lite, Aggressive, or bounded Custom cache lifetimes for cache rules.
  5. Save the rule, then request an eligible matching page once to generate it.
  6. Use Basil > Dashboard to inspect cache health or purge one URL or all pages.

Basil notices use WordPress’s standard close control. Dismissing the recurring
configured-cache confirmation is remembered for the current administrator;
new safety warnings remain independent and visible.

HEAD and conditional ETag requests may consume an existing entry. Only an
eligible anonymous GET response can generate one.

Support

Website: basilcache.com

The Basil dashboard reports setup, ownership, conflict, and cache-directory
state. If caching is unavailable, first review its contextual guidance and
confirm that WordPress can write wp-config.php, wp-content/, and the cache
directory through the configured filesystem method.

When requesting support, include the Basil and WordPress versions, PHP version,
the dashboard status text, and reproducible rule inputs. Do not publish cached
HTML, cookies, authorization headers, filesystem credentials, or private site
data.

Privacy

Basil does not send data to third parties or collect telemetry. Cached files
contain final anonymous HTML responses and private cache metadata on the local
server. Depending on the rendered page, that anonymous HTML may contain public
site content or visitor-independent output produced by other plugins. Site
administrators are responsible for configuring rules that exclude dynamic or
personalized pages. Administrators can purge these files from the Basil
dashboard.

Kuvankaappaukset

Asennus

  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.

UKK

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.

Arvostelut

There are no reviews for this plugin.

Avustajat & Kehittäjät

“Basil” perustuu avoimeen lähdekoodiin. Seuraavat henkilöt ovat osallistuneet tämän lisäosan kehittämiseen.

Avustajat

Käännä “Basil” omalle kielellesi.

Oletko kiinnostunut kehitystyöstä?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Muutosloki

0.1.5

  • Require WordPress 6.9 and use its native finalized-template buffer for response capture; respect streaming opt-outs.
  • Store cache data under the configured uploads directory and honor relocated filesystem paths.
  • Move the Basil admin menu below Settings.

0.1.4

  • Make Basil dashboard and rule-operation notices dismissible.
  • Remember configured-cache notice dismissal per administrator across reloads.
  • Preserve visibility of separate safety warnings and remove dismissal data on uninstall.

0.1.3

  • Add one-click recovery for stale or incomplete Basil wp-config.php markers.
  • Preserve other cache plugins’ declarations and configuration during repair.
  • Report damaged Basil marker state as ”Needs repair” instead of unavailable.

0.1.2

  • Add a one-click all-pages Lite quick start.
  • Add dashboard, website, contact, and toolbar shortcuts.
  • Move Basil higher in the administration menu and name its Dashboard submenu.
  • Make the configured-cache notice dismissible and add guarded directory indexes.

0.1.1

  • Fix cache generation on FastCGI configurations where PHP does not expose request server fields through filter_input().
  • Show the configured WordPress timezone next to the scheduled cleanup time.

0.1.0

  • Initial release of layered cache rules and local static HTML page caching.