Make WordPress Core

Opened 6 months ago

#60254 new enhancement

Add filter to class-wpdb.php#query that allows to return data from filter return value

Reported by: mguenter's profile mguenter Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.5
Component: Database Keywords:
Focuses: Cc:


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:

Change History (0)

Note: See TracTickets for help on using tickets.