PluginProbe
ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO / 2.7.0
ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO v2.7.0
2.7.0 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0 2.1.1 2.1.0 2.0.2 2.0.1 2.0.0 1.32.0 1.31.0 1.30.0 1.29.0 1.28.0 1.27.0 1.26.0 1.25.0 trunk 1.0.0 1.0.1 1.0.2 1.1.0 1.10.0 All 48 releases
← All changes | includes/ai/class-cache-manager.php +9 -2 1.27.02.7.0 View file →
@@ -121,10 +121,17 @@
121 121 */
122 122 public function clear_all(): bool {
123 123 global $wpdb;
124 124
125 - // Clear memory cache (if using object cache)
126 - wp_cache_flush_group(self::CACHE_GROUP);
125 + // Clear memory cache (if using object cache).
126 + // wp_cache_flush_group() is WP 6.1+ and the plugin supports 6.0; see
127 + // Schema_Cache_Manager::clear_all() for the reasoning behind the
128 + // fallback rather than a skip.
129 + if (function_exists('wp_cache_flush_group')) {
130 + wp_cache_flush_group(self::CACHE_GROUP);
131 + } else {
132 + wp_cache_flush();
133 + }
127 134
128 135 // Clear database cache
129 136 $table_name = $wpdb->prefix . 'thinkrank_ai_cache';
130 137 // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching, PluginCheck.Security.DirectDB.UnescapedDBParameter -- Table name is properly constructed from controlled prefix, cache clearing requires direct database access