This manual describes the plugin screen by screen, from first start-up to the developer hooks. Red boxes flag what surprises people or carries consequences; grey boxes explain why something works the way it does.
Version 2.1.1.
1. What a page cache is for
Without a cache, WordPress rebuilds your page on every visit: it boots, connects to the
database, queries some thirty tables, runs your plugins, assembles the theme, then sends the
result. That usually takes between 300 and 900 milliseconds — and the visitor waits.
A cache keeps the already-assembled result and sends it as it stands to the next visitor.
The same page then goes out in a few tens of milliseconds.
Render cache and early serving
| What happens | Order of magnitude | |
|---|---|---|
| No cache | WordPress boots and rebuilds everything. |
300 to 900 ms |
| Render cache | WordPress boots, then notices a copy exists and sends it. |
~120 ms |
| Early serving | The copy goes out before WordPress boots. |
~10 ms |
The difference comes down to one file dropped into wp-content/, which
WordPress calls before the plugins, before the theme, and even before connecting to the
database. That is what Marly’s Cache does when you switch on early serving.
Measured, not promised. On a demonstration site loaded
with seven plugins, the home page went from 0.60 s to 0.137 s. Your own gap will depend on
your hosting and your plugins; the order of magnitude holds.
2. First steps
Installing
Plugins → Add New → Upload Plugin, then choose the ZIP file you received. Activate. A
Settings → Marly’s Cache screen appears.
Entering the licence Pro
Paste the key you received by email (it looks like
MLP-XXXX-XXXX-XXXX-XXXX) and activate.
All the keys in the Marly’s range look alike, and the email does not
always say which product yours belongs to. If activation is refused, read the message: it
names the product the key really belongs to.
Without a valid licence, the page cache keeps working normally; only the
advanced features go dormant. A site never slows down because a licence has expired.
Three moves, and it is done
- Switch page caching on.
- Choose your kind of site: blog or brochure, online shop, news site. The
matching settings are applied in one go. - Switch on early serving if the screen offers it.
3. Choosing your kind of site
Rather than asking you for a duration in seconds, the screen asks what kind of site this
is. Three profiles are offered, and each one sets the lifetime, the compression and the
excluded pages in a single move.
| Profile | Why | Lifetime | Excluded pages |
|---|---|---|---|
| Blog or brochure site | Content that changes little. Long cache, maximum performance. |
1 day | none |
| Online shop | Stock and prices move. Shorter cache, sales pages excluded. |
6 hours | cart, checkout, my account, and their French equivalents |
| News site | Frequent publishing. Short cache to stay current. |
1 hour | none |
A fourth choice, Custom, leaves every option in your hands. Changing a
detailed setting automatically switches the profile to “custom”: the two cannot
contradict each other.
The lifetime matters less than people think. Pages are
refreshed anyway as soon as content is published or changed. The duration is only a safety
net for what the plugin cannot see coming — content that changes by itself, an external
feed.
4. Early serving
This is what tells a real page cache apart from a mere render cache.
When you switch it on, the plugin drops an advanced-cache.php file into
wp-content/ and sets WP_CACHE in your configuration. WordPress calls
that file before loading the plugins, the theme, and even before connecting
to the database. If a copy of the page exists, it goes out immediately.
A principle of caution. This file runs on every
request, ahead of every WordPress safeguard. At the slightest uncertainty it hands back
control silently and the request proceeds normally, without a cache. It must never
raise a fatal error, or the whole site would become unreachable: that is why it does almost
nothing beyond reading a file.
Two caches do not live together
If another caching plugin is already in place, the screen detects it and refuses to switch
on early serving: two page caches installed together get in each other’s way.
Deactivate the other plugin first.
Removing it
Switch the option off, or simply delete the file: the site carries on with the ordinary
render cache. The file is regenerated on every plugin update; editing it by hand is
pointless.
5. What is never cached
A cache that served one visitor another person’s page would be worse than useless. Marly’s
Cache guards against that in three ways.
Identified visitors
As soon as one of these cookies is present, the page is neither served from nor stored in
the cache:
wordpress_logged_in_…— the person is logged in;comment_author_…— they have left a comment;wp-postpass_…— they have entered the password of a protected post;woocommerce_items_in_cart,woocommerce_cart_hash,
wp_woocommerce_session_…— they have a cart open.
The list can be extended through the marlys_cache_skip_cookies filter.
The pages you exclude
One address per line, from the root. The asterisk stands for any run of characters — for
example /my-account*.
Cart, checkout and customer account are already excluded automatically:
you do not have to think about them.
Requests that do not lend themselves to it
Form submissions, interface calls, the admin area, feeds, searches and error pages are
never cached.
6. When the cache clears itself
You do not have to think about it. The relevant cache is cleared:
- when content is published or changed — the page itself, the home page,
the archives and the related pages; - when a comment arrives;
- when the theme changes — the whole cache, this time;
- when a WooCommerce product’s stock changes, including for a variation,
and when its stock status flips.
The Clear cache button is there for everything else, and the screen shows
at any moment the number of cached pages and the space they occupy.
Stock is the classic trap of a shop. A product down to
zero that keeps showing as “in stock” for six hours means an order that cannot be
fulfilled. That is why the stock purge is wired to all three WooCommerce hooks, variations
included.
7. Compression
Gzip compression cuts page weight by roughly 70 %. It is recommended and
on by default.
If the zlib extension is not installed on your server, the screen says so and
the option stays unavailable — rather than offering a setting with no effect.
8. The advanced features
Pro Without a valid licence the page cache works normally; these
four features simply lie dormant.
Minification
Strips needless spaces and comments from the cached HTML. <pre> and
<textarea> blocks and script contents are protected before the operation
and restored afterwards.
If your layout behaves oddly after switching it on, switch it off: some
themes rely on significant whitespace. A comment to be kept is marked
<!-- MC_KEEP_… -->.
Mobile cache
Keeps a separate version for mobile devices. Only useful if your theme sends
different code to mobiles. An ordinary responsive theme — the same code for everyone,
with the layout changing through CSS — has no need of it, and switching it on would double the
cache for nothing.
Preloading
Puts the main pages back into the cache right after a clear-out. Stops the first visitor
after a publication from waiting for the page to be generated.
CDN
Give your CDN’s address: images, styles and scripts will be served from it.
srcset attributes are rewritten too — that is what most plugins forget, and it
leaves high-density images on the origin server. The list of file extensions concerned is
adjustable, and filterable through marlys_cache_cdn_extensions.
Leave the field empty if you do not use a CDN.
Logged-in users
Allows the pages seen by certain roles to be cached. Each person gets their own
copy: no personalised page can be seen by anyone else.
Leave it off if in doubt. Logged-out visitors — nearly all your traffic —
are already cached; the gain is small and the risk is real if a role sees data belonging to
its own account.
9. The two editions
| Free | Professional | |
|---|---|---|
| Page cache, profiles, exclusions | yes | yes |
| Early serving (drop-in) | yes | yes |
| Gzip compression | yes | yes |
| Automatic purges, WooCommerce included | yes | yes |
| HTML minification | — | yes |
| Separate mobile cache | — | yes |
| Preloading after a clear-out | — | yes |
Rewriting to a CDN, srcset included |
— | yes |
| Cache for logged-in users | — | yes |
| Automatic updates | — | yes |
The free edition is not crippled where it counts. Early
serving — what takes a page from 120 ms to 10 ms — is included. The professional edition adds
what heavy sites need: minification, CDN, preloading.
10. Developer hooks
| Hook | Type | What it allows |
|---|---|---|
marlys_cache_skip_cookies |
filter | The list of cookies that prevent caching. To add those of a particular plugin. |
marlys_cache_cdn_extensions |
filter | The file extensions rewritten to the CDN. |
marlys_cache_purged_post |
action | After a content purge; receives its id and the addresses cleared. |
marlys_cache_purged_all |
action | After a full clear-out; receives the number of files deleted. |
11. Frequently asked questions
Do my visitors see a stale page?
No: the cache clears as soon as content is published or changed, and the lifetime is only a
safety net. When in doubt, the Clear cache button settles it in a
second.
My WooCommerce cart shows zero items.
That does not happen with the default exclusions: cart, checkout and customer account are
outside the cache, and the mere presence of a cart cookie switches caching off for that
visitor. If the symptom appears, another cache is in place — your host’s, or a second
plugin.
I switched on minification and my page looks wrong.
Switch it off. Some themes rely on significant whitespace. It is not a fault, it is an
incompatible layout choice.
Should I switch on the mobile cache?
Only if your theme sends different code to mobiles. An ordinary responsive theme has no need
of it: switching it on would double the cache size for no gain.
What happens if my licence expires?
The page cache, early serving and the purges carry on. Only the four advanced features go
dormant. The site does not slow down.
And if I delete the plugin?
The early-serving file is removed and WP_CACHE reset. The site goes back to
how it worked before, with nothing for you to do.