Changelog for Monster Full Page Cache (MonsterFPC)
by Yanni Sanmiguel 
Documentation: https://modxmonster.com/
===================================================

MonsterFPC 2.0.0-pl
--------------------
*Major architectural update, pure HTML FPC routing, and Cache Warmer introduction.*

[Added]
- Client-Side Cache Warmer (Crawler): Introduced a new snippet (`MonsterFPC_Crawler`) to silently parse XML sitemaps and warm up the cache asynchronously via background iframe fetching.
- Dashboard Widget: Added the "MonsterFPC Crawler" widget, allowing administrators to trigger cache warmups directly from the MODX manager.
- 404/403 Protection (Disk Exhaustion Shield): The plugin now strictly refuses to cache Error (404) or Unauthorized (403) pages, preventing malicious bots from poisoning the cache and exhausting server disk space with fake URLs.
- System Settings: Added `monsterfpc.sitemaps` to easily configure multiple XML sitemaps for the Crawler.

[Changed]
- Native Web Server Routing (Pure HTML): Dropped the hashed file system in favor of a 1:1 physical directory structure (e.g., `/monsterfpc/domain.com/uri/index.html`). This allows Nginx/Apache to serve the static files natively, keeping PHP and MySQL completely asleep for a 0ms TTFB.
- Removed PHP-Level Gzip Compression: Delegated Gzip/Brotli compression entirely to the web server infrastructure (Nginx/CDN) for superior CPU performance and stricter separation of concerns.
- Surgical Cache Purges: Hooked to `OnDocFormSave`, the plugin now intelligently nukes only the specific page being edited across all contexts, preserving the rest of the cache.
- Build Script Enhancement: The package builder now reliably fetches components directly from the database and generates the Dashboard Widget on the fly to guarantee a bulletproof installation.

[Fixed]
- Fixed HTTP 500 Fatal Errors in PHP 8+ by implementing strict object validations (`isset`, `is_object`) for `$modx->resource`, `$modx->event`, and `$modx->context` before executing logic.
- Resolved memory reference breaks during output extraction in the `OnWebPagePrerender` event.

===================================================

MonsterFPC 1.0.1-pl
--------------------
*Initial release of the modernized fork based on xFPC.*

[Added]
- Native Gzip compression (Level 9): Drastically reduces the disk space required for the cache by 80% to 90%, while improving network transfer speeds.
- HTML Minification: Automatically removes unnecessary whitespace, tabs, and line breaks before compressing the cached file.
- URL Normalization: Ignores query strings (like ?fbclid= or ?utm_source=) when generating cache hashes to prevent massive cache duplication for the same page.
- Modern Fetch API in the Hole Punching Snippet: Replaced the outdated XMLHttpRequest/ActiveXObject with modern, non-blocking asynchronous JavaScript.
- Network Timeout Protection: Added a strict 2-second timeout context for dynamic resource fetching in the snippet to prevent server deadlocks.

[Changed]
- Fully refactored and optimized for PHP 8.2+ compatibility.
- Replaced slow directory iteration (opendir/readdir) with native glob() for faster cache clearing operations.
- Replaced deprecated JavaScript `unescape()` function with `decodeURIComponent()` for CSS injection.
- Updated project name, branding, and docblocks to "Monster Full Page Cache" while respecting the original GPL license and author credits.

[Fixed]
- Fixed PHP 8.2 warnings related to uninitialized variables.
- Fixed fatal "headers already sent" errors during MODX late execution by implementing strict `headers_sent()` validations across all header outputs.

===================================================
Legacy Changelog (xFPC by SCHERP Ontwikkeling)
===================================================