OllieJones / fast-woo-order-lookup

WooCommerce / WordPress plugin to speed up searches for orders
GNU General Public License v2.0
13 stars 1 forks source link

Add a cache for the order-page custom field names (the meta_key values) #13

Closed OllieJones closed 4 months ago

OllieJones commented 4 months ago

There's an absurdly slow query to fetch the meta key names that don't begin with underscores. That list of names is used to populate the custom field user-interface on the order page.

Add a cache to hold the results of that query, so it doesn't have to be repeated.

Add code to update that cache as needed when a new order appears, or when an order is changed.