PluginProbe
Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization / trunk
Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization vtrunk
4.2.14 4.2.13 4.2.12 4.2.11 4.2.10 4.2.9 4.2.8 4.2.7 4.2.6 4.2.5 2.5.5 2.5.6 2.5.7 3.0.0 3.0.1 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.11.0 3.11.1 3.11.2 3.11.3 3.12.0 All 135 releases
← All changes | vendor/codeinwp/themeisle-sdk/src/Product.php +1 -4 4.2.9 → trunk View file →
@@ -151,11 +151,9 @@
151 151 $this->install = (int) $install;
152 152 self::$cached_products[ crc32( $basefile ) ] = $this;
153 153 $current_version = get_option( $this->slug . '_version', '' );
154 154
155 - if ( $current_version !== $this->version && wp_cache_get( "{$this->slug}_version_upgrade" ) === false ) {
156 - // Set the cache lock to avoid multiple calls.
157 - wp_cache_set( "{$this->slug}_version_upgrade", true, HOUR_IN_SECONDS );
155 + if ( $current_version !== $this->version && wp_cache_add( "{$this->slug}_version_upgrade", true, '', HOUR_IN_SECONDS ) ) {
158 156 /**
159 157 * Action to be triggered when the product is updated.
160 158 *
161 159 * @param string $current_version The current version of the product.
@@ -165,9 +163,8 @@
165 163 do_action( "themeisle_sdk_update_{$this->slug}", $current_version, $this->version, $basefile );
166 164
167 165 // Update the version of the product.
168 166 update_option( "{$this->slug}_version", $this->version );
169 - // Delete the cache lock.
170 167 wp_cache_delete( "{$this->slug}_version_upgrade" );
171 168 }
172 169 }
173 170