Opened 3 years ago
#60254 new enhancement
Add filter to class-wpdb.php#query that allows to return data from filter return value
| Reported by: | mguenter | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Database | Version: | 6.5 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
Similar to #2721, but allows not only changing the SQL query, but also the return value. In our case, we want to cache some SQL queries from third-party plugins that refuse to implement an object cache.
Here is an example of a plugin which runs a SQL query multiple times without using a cache mechanism:
I have prepared a suggestion for this, but I do not know if this covers all cases from $wpdb usage or needs some adjustments: https://gist.github.com/matzeeable/4473915b225aa1550d5da5b9b0b19b16/revisions
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
