monsterfpc.enabled): The master switch. Set to 1 to activate the cache engine or 0 to disable it entirely across the site.
monsterfpc.cachelife): Defines how long (in seconds) a cached page remains valid. If set to 0, the cache will never expire automatically and will only be refreshed when the resource is manually updated.
monsterfpc.exclude): A powerful filter to prevent specific pages from being cached. Enter URL patterns or paths (one per line), such as /checkout or sitemap.
monsterfpc.minifyhtml): When enabled, the engine strips unnecessary white spaces, tabs, and non-essential comments from the HTML, significantly reducing the final file size.
monsterfpc.combinecss): Automatically identifies all CSS files in the <head>, merges them into a single optimised file, and serves it from the internal cache folder.
monsterfpc.combinejs): Similar to CSS combination, it gathers JavaScript files and bundles them into one single script tag just before the closing head tag.
monsterfpc.excludecss / excludejs): Comma-separated lists of filenames that should be ignored by the combination engine (e.g., jquery.min.js).
monsterfpc.minifycss / minifyjs): Applies lightweight compression to the combined assets to further reduce file size.
The snippet allows for manual control over the caching process on a per-page basis.
&bypass=`1` to prevent the engine from saving or serving a cached version of the current request.
1. Prevent caching on a specific page:
[[!MonsterFPC? &bypass=`1`]]
2. Conditional bypass (e.g., only if a URL parameter exists):
[[!MonsterFPC? &bypass=`[[!+requested_action:is=`update`:then=`1`:else=`0`]]`]]
Tip: Always call the snippet uncached (using the exclamation mark) at the very top of your Template or Resource content.
MonsterFPC operates on the OnWebPageComplete and OnInitCulture events. When an anonymous user requests a URL, the plugin generates a unique hash based on the context and the URI, creating a .gz file in the file system.
The most interesting part is its Surgical Mapping System: when the cache is generated, we create a .map file on disk linked to the resource ID. This allows the plugin, when a resource is edited, to delete the exact file without costly URL calculations.
* Cloudflare Compatibility (v1.0.1)
If your site is routed through Cloudflare and you have features like Auto Minify, Rocket Loader, or aggressive caching enabled, visitors might occasionally see a screen full of random, unreadable symbols.
This occurs because Cloudflare intercepts the pre-compressed GZIP binary data sent by MonsterFPC and attempts to inspect, modify, or re-compress it (often using Brotli). This strips the original HTTP headers, leaving the browser unable to decode the file correctly.
MonsterFPC is free to use for personal and commercial projects.
If you would like to support the continued development of this project, consider making a donation.
Support developmentQuestions regarding file permissions or exclusions? Feel free to contact me at any time.
Contact Me