Commit e4d5b29954c for woocommerce
commit e4d5b29954c9ae06be029032c6d183e3b0e879cc
Author: Radoslav Georgiev <rageorgiev@gmail.com>
Date: Wed Sep 30 17:26:49 2026 +0300
Product catalog: Only flush runtime cache (#69243)
* Update memory manager to only flush runtime cache
* Changelog entry
diff --git a/plugins/woocommerce/changelog/2026-09-30-10-12-30-311640 b/plugins/woocommerce/changelog/2026-09-30-10-12-30-311640
new file mode 100644
index 00000000000..425636203e9
--- /dev/null
+++ b/plugins/woocommerce/changelog/2026-09-30-10-12-30-311640
@@ -0,0 +1,4 @@
+Significance: patch
+Type: fix
+
+Stop product feed generation from clearing the site-wide object cache; only the process's in-memory cache is freed.
diff --git a/plugins/woocommerce/src/Internal/ProductFeed/Utils/MemoryManager.php b/plugins/woocommerce/src/Internal/ProductFeed/Utils/MemoryManager.php
index f311fb930db..e8f15b90e34 100644
--- a/plugins/woocommerce/src/Internal/ProductFeed/Utils/MemoryManager.php
+++ b/plugins/woocommerce/src/Internal/ProductFeed/Utils/MemoryManager.php
@@ -37,7 +37,9 @@ class MemoryManager {
}
/**
- * Flush all caches.
+ * Flush the in-memory caches of the current process.
+ *
+ * The shared persistent object cache (e.g. Redis or Memcached) is left untouched.
*
* @since 10.5.0
*/
@@ -46,7 +48,9 @@ class MemoryManager {
$wpdb->queries = array();
- wp_cache_flush();
+ if ( wp_cache_supports( 'flush_runtime' ) ) {
+ wp_cache_flush_runtime();
+ }
if ( ! is_object( $wp_object_cache ) ) {
return;