Allows user to cache output of any shortcode by adding a cache attribute to it.
Author: | Arūnas Liuiza (profile at wordpress.org) |
WordPress version required: | 4.7 |
WordPress version tested: | 4.9.4 |
Plugin version: | 0.2.0 |
Added to WordPress repository: | 16-06-2017 |
Last updated: | 08-02-2018
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
|
Rating, %: | 100 |
Rated by: | 1 |
Plugin URI: | http://arunas.co |
Total downloads: | 1 067 |
Active installs: | 10+ |
Click to start download
|
Screenshots
Settings screen.
FAQ
Installation Instructions
- Install via
WP Admin > Plugins > Add New
or download a .zip file and upload via FTP to /wp-content/plugins/
directory
- Activate the plugin through the ‘Plugins’ menu in WordPress
- (optional) Modify options via
WP Admin > Settings > ShortCache
, if needed.
- In the shortcode You want to cache, add a
cache
attribute:
.
- (optional) You can define a custom cache interval by passing that to the attribute like this:
– this will be cached for 5 hours.
- (optional) You can also define a custom cache scope by passing a
cache-scope
attribute:
. This will create different caches for every user and every post.
So, how do I cache a shortcode?
In the shortcode You want to cache, add a cache
attribute:
.
Can I control how long should it stay in cache?
Yes, there is a setting for that in Settings > ShortCache
. Also You can define a custom cache interval by passing that to the attribute like this:
– this will be cached for 5 hours.
What does “Cache Scope” mean?
This defines how granular the cache should be. If you disable all check-boxes, one cache value will be stored for the whole site. If you check ‘User ID’, a different value will be cached for every logged in user. You can also differentiate it by Post ID or the URI where the short code is displayed.
The “Last Update Timestamp” setting ensures that caches are regenerated if there is an update (a saved post/page) somewhere on the site.
Can I control Cache Scope on per shortcode basis?
Yes, You can define a custom cache scope by passing a cache-scope
attribute:
. This will create different cache values for every user and every post.
ChangeLog
0.2.0
- Initial release on wp.org
0.1.0