Automattic / woocommerce-payments

Accept payments via credit card. Manage transactions within WordPress.
https://wordpress.org/plugins/woocommerce-payments/
Other
174 stars 69 forks source link

Clear onboarding field info from database cache #9269

Open dechov opened 2 months ago

dechov commented 2 months ago

As of now, wcpay_onboarding_fields_data is never cleared from “cache” (backed by the options table) – it is not used except in one specific (onboarding) case, takes up over 100kB (at least under the one set of conditions I tested), and is automatically fetched if not available.

According to @dmallory42 this can be addressed by "clearing it after the onboarding is complete", or "making it a transient instead" to facilitate automatic expiration (either as part of Database_Cache util or bypassing it?)

(Edit: we should also consider stores that are upgrading, making sure to apply expiration retroactively)

vbelolapotkov commented 2 months ago

Looks like account life cycle issue, so triaging it as such. @anu-rock @dmallory42 please let me know if this is not the case.

anu-rock commented 2 months ago

@dechov Thanks for spotting this! Do I understand correctly that the main concern of this issue is not the storage of cache in client DB but the performance impact of sending 100 kilobytes of data to browser in WC_Payments_Admin::get_js_settings?

anu-rock commented 1 month ago

@dechov Gentle nudge, in case you missed my last ping. I am marking this as low priority for now.