Download the PHP package alleyinteractive/wp-404-caching without Composer
On this page you can find all versions of the php package alleyinteractive/wp-404-caching. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download alleyinteractive/wp-404-caching
More information about alleyinteractive/wp-404-caching
Files in alleyinteractive/wp-404-caching
Package wp-404-caching
Short Description Full Page Cache for WordPress 404s
License GPL-2.0-or-later
Homepage https://github.com/alleyinteractive/wp-404-caching
Informations about the package wp-404-caching
WP 404 Caching
A WordPress plugin to provide full page caching for 404 pages, improving performance and reducing server load.
- Contributors: alleyinteractive
- Tags: alleyinteractive, wp-404-caching
- Stable tag: 1.0.3
Requirements
- SSL enabled on the website.
- An external object cache setup (e.g., Redis, Memcached).
- Requires at least: 6.3
- Tested up to: 6.4
- Requires PHP: 8.1
- License: GPL v2 or later
Description
WP 404 Caching is a lightweight plugin that efficiently serves cached 404 pages to non-logged-in users. It reduces server load by storing the cached 404 page in an external object cache and returning it early in the request process.
The plugin uses a dual regular/stale caching strategy to minimize cache misses. It maintains a regular cache with a 1-hour expiration and a stale cache with a 1-day expiration. If the regular cache is empty, the stale cache is served.
Features
- Full page caching for 404 pages
- Utilizes external object cache for storing cached 404 pages
- Dual regular/stale caching strategy to minimize cache misses
- Automatically generates and caches 404 page via a "guaranteed 404 URI"
- Triggers cache generation hourly via a cron job and immediately on cache misses
- Sends
X-WP-404-Cache
header to indicate cache HIT/MISS status - Ensures compatibility with analytics by replacing the "guaranteed 404 URI" with the actual requested URI in the cached page
Installation
Via Composer (recommeded):
You can install the package via composer:
Manual install:
- Upload the
wp-404-caching
directory to your/wp-content/plugins/
directory. - Activate the plugin through the 'Plugins' menu in WordPress.
Usage
The plugin works out of the box with default settings. You can customize the cache expiration times by modifying the CACHE_TIME
and STALE_CACHE_TIME
constants in the Full_Page_Cache_404
class.
Activate the plugin in WordPress and use it like so:
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
This project is actively maintained by Alley Interactive. Like what you see? Come work with us.
License
The GNU General Public License (GPL) license. Please see License File for more information.
Developer Notes
Testing
Run composer test
to run tests against PHPUnit and the PHP code in the plugin.
All versions of wp-404-caching with dependencies
alleyinteractive/composer-wordpress-autoloader Version ^1.0
alleyinteractive/wp-type-extensions Version ^2.1