Jinx Fast-Cache provides a simple but highly efficient way to implement full-page caching. It generates static HTML files of your pages, which are then served directly by your web server (Apache or Nginx).
By bypassing the entire PHP process and database queries, your server load is significantly reduced and your website response time becomes near-instant. Unlike many other plugins, Jinx Fast-Cache is built with a developer-first approach, working primarily with URLs and offering deep integration via filters and actions.
To serve the cached files directly, you must add rewrite rules to your server configuration.
For Apache (.htaccess):
The plugin will attempt to modify your .htaccess automatically. If it fails, add this manually:
# BEGIN Jinx Fast-Cache
RewriteEngine On
RewriteBase /
RewriteCond %{DOCUMENT_ROOT}/wp-content/jinx-fast-cache/%{HTTP_HOST}/%{REQUEST_URI}/%{QUERY_STRING}/index.html -s
RewriteCond %{REQUEST_METHOD} GET
RewriteRule .* /wp-content/jinx-fast-cache/%{HTTP_HOST}/%{REQUEST_URI}/%{QUERY_STRING}/index.html [L]
# END Jinx Fast-Cache
For Nginx:
Add the following logic to your server block:
set $cache_path false;
if ($request_method = GET) {
set $cache_path /wp-content/jinx-fast-cache/$host/$uri/$args/index.html;
}
location / {
try_files $cache_path $uri $uri/ /index.php?$query_string;
}
Jinx Fast-Cache is highly extensible. While a settings panel is available, developers can fine-tune every detail via filters and actions.
<= 0 to process everything at once (Caution: High server load).__return_empty_array to ignore all parameters.Since static HTML files cannot execute PHP, Jinx allows you to “inject” dynamic content (like a user’s name or a shopping cart) via AJAX.
Injecting a Template Part:
do_action('jinx_fast_cache_inject_template', 'template-slug', 'Placeholder text...');
Injecting via Function Call:
You can call any public function or class method:
do_action('jinx_fast_cache_inject', 'date', ['Y']);
do_action('jinx_fast_cache_inject', ['MyClass', 'myMethod'], [$arg1, $arg2]);
Using Shortcodes:
[jinx_fast_cache_inject placeholder="Loading..."] Your dynamic content here [/jinx_fast_cache_inject]
JS Callbacks:
Trigger custom JavaScript after the content has been injected:
$('.element').on('jinx-fast-cache-inject', (e) => { /* Handle injection */ });
element.addEventListener('jinx-fast-cache-inject', (e) => { /* Handle injection */ }, false);
Tags are a powerful way to link multiple URLs together. If one URL is flushed, all other URLs sharing the same tag will also be purged. This is perfect for linking a “Latest Posts” widget on your homepage to your single post entries.
Via Shortcode:
[jinx_fast_cache tags="news,homepage"]
Via Action:
do_action('jinx_fast_cache', ['tags' => 'tag1,tag2']);
do_action('jinx_fast_cache', ['tags' => ['tag1', 'tag2']]);
Override the global TTL for specific high-traffic or highly dynamic pages.
Via Shortcode:
[jinx_fast_cache ttl="3600"] or `[jinx_fast_cache ttl="12 hours"]`
Via Action:
do_action('jinx_fast_cache', ['ttl' => 3600]);
Combined Call (Tags + TTL):
do_action('jinx_fast_cache', ['ttl' => 3600, 'tags' => ['foo', 'bar']]);<h3>Roadmap</h3>
– [x] Release the plugin
– [x] Add HTML minification for output
– [x] Allow injection of dynamic rendered templates using ajax requests
– [x] Add taxonomies
– [x] Provide scheduled tasks
– [x] Add admin columns for cache status
– [x] Provide exclude option for posts and terms in backend
– [x] Add multisite support
– [x] Flush and warm after update complete
– [x] Add possibility to ignore 404
– [x] Allow query params to be excluded or totally ignored
– [x] Provide cache duration
– [x] Provide admin panel to change options
– [x] Add tags to flush related pages
– [x] Add shortcode for injects
– [x] Add JS events for injects
– [x] Gutenberg inject block