Skip to main content
Cybersalt Consulting Ltd
Joomla extension

Edge Cache Marker

Fast public site + working front-end editor

FreeJoomla 5Joomla 6 v1.0.2
Free

Free download. GPL, the same license as Joomla.

Edge Cache Marker is a free Joomla 5 / 6 system plugin that sets a marker cookie on editor login so upstream edge caches โ€” Cloudflare Cache Rules, Fastly, Bunny, Varnish, NGINX proxy_cache, any CDN with cookie inspection โ€” can bypass cached HTML for authenticated editor sessions while still serving cached HTML at edge speed to everyone else. Public visitors get the ~30 ms edge-hit TTFB the cache is there to deliver; logged-in editors keep seeing every SP Page Builder edit pencil, Joomla inline pencil, module edit icon, and template edit icon in their overlay.

Why this exists

The moment you put a full-HTML edge cache in front of a Joomla site, editor UX breaks. TTFB drops from ~200 ms to ~30 ms for anonymous visitors โ€” a huge win. But logged-in editors visit their pages and every inline edit icon is gone, because the edge is serving them the same anonymous-user render everyone else gets. The obvious fix โ€” bypass on "any Joomla session cookie" โ€” over-corrects: Joomla starts a session for every anonymous contact-form submitter, so cookie-based bypass wipes out cache-hit ratio for the entire audience. Edge Cache Marker fires only on onUserAfterLogin, only for users in the configured editor groups. Registered-only members reading paywalled articles don't trigger the marker. Anonymous form submitters don't trigger the marker. Only real editors do โ€” cache-hit ratio stays maximal, editor overlays come back.

How it works

On onUserAfterLogin, if the logging-in user is in one of the configured editor groups (default: Author, Editor, Publisher, Manager, Administrator, Super Users), the plugin writes a session-scoped cs_edit_session=1 cookie. Your CDN's cache rule inspects the cookie and bypasses cache when it's present. On onUserAfterLogout, the plugin sends an expired cookie so the browser clears the marker. Nothing in Joomla renders differently; the plugin doesn't touch the response body. All it does is set one cookie at login and clear it at logout. It fires on administrator logins too, and unlike Joomla's own joomla_user_state cookie it is limited to the groups you choose.

Chrome DevTools showing the response to an editor's login request, with the header Set-Cookie: cs_edit_session=1 highlighted
An editor logs in and the response sets the cs_edit_session=1 marker cookie (Chrome DevTools, Network tab).

Every setting, the cache rules, how to check it is working, and troubleshooting are in the documentation.

What you configure

System โ†’ Manage โ†’ Plugins โ†’ search "csedgecachemarker".

FieldDefaultWhat it controls
Cookie namecs_edit_sessionThe name your edge-cache bypass rule looks for.
Cookie value1The value your rule matches against.
Editor user groupsAuthor, Editor, Publisher, Manager, Administrator, Super UsersOnly members of these groups get the marker on login.
Cookie lifetime (seconds)00 = session cookie (dies when the browser closes). Set to a positive value to make the marker persist across restarts.
SameSiteLaxAuto-downgrades from None to Lax on HTTP requests.
HttpOnlyOffKeep off unless you're sure no client-side JS needs to read the marker.
Debug loggingOffWrites plg_system_csedgecachemarker.php to Joomla's log folder each time the cookie is set or cleared. Lines include the user ID and IP address.

The other half โ€” the edge-cache rule

The plugin only sets the cookie. Your CDN or reverse proxy is what actually bypasses cache when it sees the cookie. Copy the snippet that matches your edge:

Cloudflare Cache Rule โ€” append to your existing cache-eligibility expression:

and not (http.cookie contains "cs_edit_session=1")

SiteGround: SiteGround's cache already skips pages Joomla marks as not cacheable, and Cybersalt SiteGround Cache never caches pages for logged-in users, so you don't need this plugin there.

Varnish VCL:

sub vcl_recv {
    if (req.http.Cookie ~ "cs_edit_session=1") {
        return (pass);
    }
}

NGINX proxy_cache:

map $http_cookie $skip_cache {
    default 0;
    "~*cs_edit_session=1" 1;
}
proxy_cache_bypass $skip_cache;
proxy_no_cache $skip_cache;

Fastly VCL:

if (req.http.Cookie ~ "cs_edit_session=1") {
    return(pass);
}

Installing it

  1. Download the ZIP above.
  2. Joomla admin โ†’ System โ†’ Install โ†’ Extensions โ†’ Upload Package File โ†’ drop the ZIP.
  3. The plugin auto-enables on install โ€” no need to visit the Plugins page.

Updating from 1.0.0 or 1.0.1? Your saved group list is kept; add Author if your authors edit on the front end.

Then add the corresponding rule snippet at your CDN or reverse proxy from the section above, log out of Joomla, log back in, and confirm the cs_edit_session=1 cookie appears in your browser's dev tools. On the next request your CDN should return Cf-Cache-Status: BYPASS (or equivalent) for your session while still returning HIT for anonymous visitors.

What to check after enabling

Whenever this plugin is enabled on an already-live CF-fronted site there's a small transitional window โ€” the moment between "plugin enabled" and "editors log out and log back in" โ€” where authenticated pages can get cached by CF with the editor's overlay HTML baked in. After that first re-login purge your edge cache once so any polluted responses evict. From that point on, every editor request carries the marker cookie, edge caches skip caching those responses, and only anonymous responses ever land in the cache.

Requirements

Joomla 5.0 or later (5.x and 6.x), PHP 8.1 or later. The plugin is a system plugin using Joomla's namespaced service-provider pattern; it does not run on Joomla 4 or older.

Open source

Edge Cache Marker is open source under GPL-2.0-or-later. Download it here on cybersalt.com. The source code and issue tracker are on GitHub at github.com/cybersalt/cs-edge-cache-marker.


Interesting blog? Like it on Facebook, Post it or share this article on other bookmarking websites.

Written by:
Tim Davis is the founder and owner of Cybersalt.

Recent changes

Version 1.0.2 20 Oct 2026

Fixes

  • Authors now get the marker cookie: new installs default to Author, Editor, Publisher, Manager, Administrator and Super Users (existing sites keep their saved list).
  • Joomla 6: the Editor user groups field now lists the groups (it was empty because Joomla 6 removed the old field type).
  • Debug logging now actually writes its log file.
  • An empty group list falls back to the default groups instead of marking every login.
  • Post-install card: logo works in subfolder installs; the settings button opens the plugin.

Changes

  • Updates now come from cybersalt.com. Display name is System - Cybersalt Edge Cache Marker.
Version 1.0.1 2 Jul 2026

Initial release. Sets a marker cookie (cs_edit_session=1 by default) on editor login so upstream edge caches (Cloudflare, SiteGround, Fastly, Varnish, Bunny, NGINX proxy_cache) bypass cached HTML for authenticated editor sessions while still serving cached HTML at edge speed to everyone else.

Add comment

Submit

Joomla websites built well and looked after properly, from Victoria, BC, Canada, since 1998.

About Cybersalt