[wp-trac] [WordPress Trac] #26804: Support multiple $wpdb handlers
WordPress Trac
noreply at wordpress.org
Fri Jan 10 11:55:34 UTC 2014
#26804: Support multiple $wpdb handlers
--------------------------------------------+------------------------------
Reporter: mgibbs189 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Database | Version: trunk
Severity: normal | Resolution:
Keywords: reporter-feedback dev-feedback |
--------------------------------------------+------------------------------
Changes (by mgibbs189):
* keywords: reporter-feedback => reporter-feedback dev-feedback
Comment:
Sure - I'm building AJAX caching for a plugin, and need access to WPDB as
early as possible. The normal `admin-ajax.php` routine fully loads WP and
all plugins, which in this case is unnecessary (every millisecond counts).
My use case: https://gist.github.com/mgibbs189/8345521
* A request is made to admin-ajax.php
* Load WPDB if it doesn't exist already
* Using WPDB, check to see if a cached version exists...
* If YES, output the cached version and EXIT
* If NO, continue loading WP
This patch will help any plugin needing to implement DB-based caching.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/26804#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list