PHPackages                             artformdev/craft-edge - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. artformdev/craft-edge

ActiveCraft-plugin

artformdev/craft-edge
=====================

Full-page HTML edge caching for Craft CMS at one edge tier (nginx or Cloudflare), with exact element-driven invalidation and CSRF/session-safe hydration.

1.4.3(1mo ago)022↓75%proprietaryPHPPHP ^8.2

Since Jul 17Pushed 1mo agoCompare

[ Source](https://github.com/artformdevelopment/craft-edge)[ Packagist](https://packagist.org/packages/artformdev/craft-edge)[ RSS](/packages/artformdev-craft-edge/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (8)Dependencies (8)Versions (9)Used By (0)

Edge
====

[](#edge)

**Full-page HTML caching for Craft CMS 5, without the usual footguns.**

Edge serves your anonymous visitors their pages straight from the edge (a folder of static files, nginx's FastCGI cache, or Cloudflare) with **PHP and the database never running**. The hard parts of full-page caching (not leaking one person's session to the next, and never serving stale content after an edit) are the parts Edge is actually built around.

- **Hits skip PHP entirely.** An anonymous page view is answered by nginx or Cloudflare in single-digit milliseconds. Craft doesn't boot.
- **Session leaks are structurally impossible.** Cacheable responses are stored *stripped of every cookie*; there is no code path that caches a response carrying someone's session.
- **Invalidation is exact.** When an editor saves, Edge purges *every* URL that rendered the changed element or ran a query the change affects: detail pages, listings (including brand-new entries), related pages, nav, in background jobs, within seconds.
- **Cached pages stay personal.** Forms, CSRF tokens, carts and greetings keep working via tiny uncached "islands" hydrated in the browser. No framework, no build step.

How it works, in one picture
----------------------------

[](#how-it-works-in-one-picture)

A cached page is an **anonymous shell**, identical for everyone, stored cookie-free and served from the edge, with a few **personal holes** filled in the browser from endpoints that are never cached:

```
┌──────────── cached, shared, cookie-free (served by nginx/Cloudflare) ────────────┐
│  header · article · product grid · footer, the same HTML for every visitor        │
│                                                                                   │
│   ┌─ island: cart / greeting ─┐        ┌─ form CSRF token (empty in the cache) ─┐  │
│   │ fetched per-visitor, live │        │ filled per-visitor by edge-hydrate.js  │  │
│   └───────────────────────────┘        └────────────────────────────────────────┘  │
└────────────────────────────────────────────────────────────────────────────────────┘

```

Anonymous cookies (`CraftSessionId`, CSRF) are **ignored** so returning visitors still get hits, and login cookies are ignored too: signed-in visitors get the same shared shell as everyone else, with their account menu, cart and CSRF tokens hydrated client-side from uncached endpoints. It's a small set of ideas that fit together. The **[How Edge works](docs/how-it-works.md)** guide walks through all of them, and it's worth ten minutes before you turn caching on.

Install
-------

[](#install)

```
composer require artformdev/craft-edge
./craft plugin/install edge
```

Then pick a driver and prepare its edge tier. Installing the plugin doesn't cache anything on its own; something in front of PHP has to store and serve the copies:

Where you hostDriverGuideSingle server / VPS (simplest, start here)`nginx-static`[nginx-static](docs/driver-nginx-static.md)You use nginx's FastCGI cache`nginx-fastcgi`[nginx-fastcgi](docs/driver-nginx-fastcgi.md)Behind Cloudflare`cloudflare`[Cloudflare](docs/driver-cloudflare.md)Copy the config file and confirm your first hit:

```
cp vendor/artformdev/craft-edge/config/edge.php config/edge.php
./craft edge/nginx/verify --url=https://your-site.test/   # (or edge/cloudflare/verify)
```

Then schedule the refresh task, so scheduled posts and expiring entries reach the cache — Craft fires no event when a date passes, so nothing else notices:

```
* * * * * cd /path/to/your/project && ./craft edge/cache/refresh-expired
```

Full walkthrough: **[Installation](docs/installation.md)**.

Documentation
-------------

[](#documentation)

The complete guide lives in **[`docs/`](docs/index.md)**. Read it in order the first time:

1. **[How Edge works](docs/how-it-works.md)**: the mental model. *Start here.*
2. **[Installation](docs/installation.md)**: install, pick a driver, first hit.
3. **Drivers**: [nginx-static](docs/driver-nginx-static.md), [nginx-fastcgi](docs/driver-nginx-fastcgi.md), [Cloudflare](docs/driver-cloudflare.md). Each covers preparing the environment, connecting Edge, and verifying.
4. **[Configuration reference](docs/configuration.md)**: every setting, in depth.
5. **[Templating for the cache](docs/templating.md)**: the anonymous shell, forms &amp; CSRF, islands, and the patterns that quietly break caching. **The key page for developers.**
6. **[Invalidation &amp; warming](docs/invalidation.md)**: how a save becomes the right purges.
7. **[CLI &amp; control panel](docs/cli-and-control-panel.md)**: commands and the utility.
8. **[Troubleshooting](docs/troubleshooting.md)**: reading the headers, and fixing the usual suspects.

At a glance
-----------

[](#at-a-glance)

**Requirements:** Craft CMS 5.0+, PHP 8.2+, a running queue, and one edge tier (any nginx for `nginx-static`; nginx + `ngx_cache_purge` for `nginx-fastcgi`; or a Cloudflare zone).

**The cookie model** (the thing that makes it safe):

Cookie classExamplesWhat Edge doesAnonymous`CraftSessionId`, CSRF token, `PHPSESSID`, Craft's login cookies**Ignored**: never key, bypass, or vary. Signed-in visitors share the anonymous shell and personalize client-side.Opt-in bypassyour `bypassCookies` (empty by default), e.g. a live cart cookie**Bypass**: always dynamic.`Set-Cookie` on a cacheable responseany**Stripped before storing**: if one survives, the page isn't stored at all.**Never stored, ever:** non-GET requests; CP / action / preview / token requests; logged-in renders (a signed-in visitor is *served* the shared anonymous copy, but their own render is never persisted); requests with a bypass cookie; non-200 or redirect responses; anything still carrying a `Set-Cookie`. A cache-write failure (read-only disk, etc.) never breaks the page: it's logged and served dynamically.

**Common commands:**

```
./craft edge/cache/clear             # clear everything (records + tier)
./craft edge/cache/clear-url    # purge one URL
./craft edge/cache/generate          # build the cache from all live element URLs
./craft edge/nginx/verify            # prove MISS -> HIT, no cookie leak
./craft edge/cloudflare/setup        # write the Cloudflare cache rules
```

License
-------

[](#license)

Commercial plugin, see [LICENSE.md](LICENSE.md) (Craft license).

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance91

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

8

Last Release

42d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/28742717?v=4)[artformdev](/maintainers/artformdev)[@ArtformDev](https://github.com/ArtformDev)

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/artformdev-craft-edge/health.svg)

```
[![Health](https://phpackages.com/badges/artformdev-craft-edge/health.svg)](https://phpackages.com/packages/artformdev-craft-edge)
```

###  Alternatives

[spicyweb/craft-neo

A Matrix-like field type with block hierarchy

393822.0k12](/packages/spicyweb-craft-neo)[craftcms/feed-me

Import content from XML, RSS, CSV or JSON feeds into entries, categories, Craft Commerce products, and more.

293967.9k41](/packages/craftcms-feed-me)[verbb/formie

The most user-friendly forms plugin for Craft.

102406.3k79](/packages/verbb-formie)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

54691.6k28](/packages/solspace-craft-freeform)[putyourlightson/craft-blitz

Intelligent static page caching for creating lightning-fast sites.

156493.1k43](/packages/putyourlightson-craft-blitz)[verbb/vizy

A flexible visual editor field for Craft.

4252.4k1](/packages/verbb-vizy)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
