=== mi13 сache === **Contributors:** mi13 **Tags:** caching, page-cache, performance, optimization **Requires at least:** 5.0 **Tested up to:** 6.9 **Stable tag:** 1.6 **Requires PHP:** 7.4 **License:** GPLv2 or later **License URI:** https://www.gnu.org/licenses/gpl-2.0.html A lightweight plugin for line-by-line caching of WordPress pages. Speeds up site loading by saving static copies of pages. == Description == Mi13 Cache is a simple and effective plugin for caching WordPress pages. It saves HTML pages as files and serves them on subsequent requests, significantly speeding up site loading. **Key features:** * Line-by-line caching of HTML pages. * Flexible settings: select which page types to cache. * Automatic cache clearing when content is updated. * Cache status displayed as an HTML comment at the beginning of the file. * Cache statistics: file size and number of files. * Security: access permission checks and filtering of system pages. * Compatibility with custom post types. == Installation == **Method 1. Automatic installation:** 1. In the WordPress admin panel, go to **Plugins → Add New**. 2. Search for “Mi13 Cache”. 3. Click **Install**, then **Activate**. **Method 2. Manual installation:** 1. Download the plugin archive. 2. Extract and upload the `mi13-cache` folder to `/wp-content/plugins/`. 3. Activate the plugin in the admin panel. 4. Add the following line to `wp-config.php`: define('WP_CACHE', true); == Usage == After activation: Go to Settings → Mi13 Cache. Configure the settings: Select page types to cache (home page, posts, pages, categories, archives, custom types). Set the cache lifetime (in seconds; default is 86 400 s / 24 hours). Clear the cache manually using the Clear Cache button (if needed). Save the settings. You can check the cache status in the page source code: Open the page source code (press Ctrl+U or right-click → “View Page Source”). Look for a comment at the very beginning of the HTML file, like this: == Settings == Page types — select which content types to cache. Cache lifetime — the interval in seconds after which the cache expires. Clear cache — a button to manually clear all cached files. == HTML comment format == The plugin adds an HTML comment with information to the beginning of each cached file: == Limitations == Caching does not apply to: authenticated users; the admin panel; 404 pages; search pages (?s=...); RSS feeds (/feed/); AJAX requests; POST requests; URLs with GET parameters (except paged for pagination). == Troubleshooting == Issue: the cache is not created. Solution: make sure that: define('WP_CACHE', true) is present in wp-config.php; WordPress has write permissions for /wp-content/cache/mi13-cache/. Issue: pages do not update after editing. Solution: manually clear the cache on the settings page. Issue: access permission error when clearing the cache. Solution: check file permissions in the cache directory. == Security == Permission check (manage_options) before clearing the cache. Caching disabled for authenticated users. Exclusion of system pages (404, search, feed, etc.). Use of the secure WordPress API for file system operations. == Directory structure == Cached files are saved in: /wp-content/cache/mi13-cache/ Each file has the .html extension and a name corresponding to the page URL. == Changelog == = 1.1 = First. = 1.2 = cosmetic = 1.3 = cosmetic = 1.4 = cosmetic, First release. = 1.6 = fix bug for custom post types