Plugin info
Maintenance & Compatibility
Maintenance score
Possibly abandoned • Last updated 1406 days ago
Is JPD2 abandoned?
Possibly abandoned (last update 1406 days ago).
Compatibility
Similar & Alternatives
Explore plugins with similar tags, and compare key metrics like downloads, ratings, updates, support, and WP/PHP compatibility.
Description
Makes caching the results of a WP_Query, WP_User_Query and WP_Meta_Query, via the transients API easy. Realize increased performance, by caching the results of your queries, with one simple function.
All saved queries are automatically reset when any post is updated.
Basic usage:
- Specify arguments for the query ($args)
- Give the query a name ($name)
- $query = jpd2_better_query( $args, $name );
- Use $query like you would any other WP_Query object.
- See FAQ for other usages
Installation
Using The WordPress Dashboard
- Navigate to the ‘Add New’ in the plugins dashboard
- Search for ‘JPD2’
- Click ‘Install Now’
- Activate the plugin on the Plugin dashboard
Uploading in WordPress Dashboard
- Navigate to the ‘Add New’ in the plugins dashboard
- Navigate to the ‘Upload’ area
- Select
JPD2.zipfrom your computer - Click ‘Install Now’
- Activate the plugin in the Plugin dashboard
Using FTP
- Download
JPD2.zip - Extract the
JPD2directory to your computer - Upload the
JPD2directory to the/wp-content/plugins/directory - Activate the plugin in the Plugin dashboard
Frequently Asked Questions
The Transients API creates temporary entries into your database. One great use is to store the result of complex queries, which allows WordPress to run one query–to get the transient–instead of many queries, and get the same results.
This article explains very well how that works. This plugin automates the process for you.
The safest method would be to wrap the call in a check of function_exists().
For example code see: https://gist.github.com/Shelob9/9425101#file-use_jpd2-php
This way if the JPD2 plugin is not activated, WordPress will run WP_Query directly, instead of returning a fatal error, which would suck.
The transient lasts up to the default transient expiration time, unless an expiration value is set with the $expire argument.
Two ways:
- Define the JPD2_EXP constant in wp-config, or anytime before this plugin is loaded.
- Use the ‘JPD2_expire’ action
The action, if used, will override the constant.
By default arguments are passed to WP_Query. You may use the $type argument. You can set it to ‘wp_query’, which is the default, ‘wp_user_query’, or ‘wp_meta_query’.
Because Star Wars.
Review feed
Screenshots
Changelog
0.0.1
- The first version on WordPress.org.
0.0.2
- Readme change for better readability in FAQ
- Update plugin URI
= 0.1.0
* Fix conditional logic preventing non WP_Query queries from working.
* Fix args in main function.
* Support for Pods queries.