PluginProbe
BlockSpare – Gutenberg Blocks for News, Magazine, Blog & Business Websites / 3.1.1
BlockSpare – Gutenberg Blocks for News, Magazine, Blog & Business Websites v3.1.1
4.1.0 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.1.0 1.1.1 1.1.2 1.2.0 1.2.1 1.2.2 1.2.3 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 2.1.2 2.5.0 2.5.3 2.6.1 All 38 releases
← All changes | freemius/includes/class-fs-api.php +3 -8 trunk3.1.1 View file →
@@ -317,14 +317,11 @@
317 317 if ( WP_FS__DEV_MODE || $this->_api->IsSandbox() ) {
318 318 $flush = true;
319 319 }
320 320
321 - $has_valid_cache = self::$_cache->has_valid( $cache_key, $expiration );
322 - $cached_result = $has_valid_cache ?
323 - self::$_cache->get( $cache_key ) :
324 - null;
321 + $cached_result = self::$_cache->get( $cache_key );
325 322
326 - if ( $flush || is_null( $cached_result ) ) {
323 + if ( $flush || ! self::$_cache->has_valid( $cache_key, $expiration ) ) {
327 324 $result = $this->call( $path );
328 325
329 326 if ( ! is_object( $result ) || isset( $result->error ) ) {
330 327 // Api returned an error.
@@ -354,11 +351,9 @@
354 351 }
355 352 }
356 353 }
357 354
358 - if ( is_numeric( $expiration ) ) {
359 - self::$_cache->set( $cache_key, $result, $expiration );
360 - }
355 + self::$_cache->set( $cache_key, $result, $expiration );
361 356
362 357 $cached_result = $result;
363 358 } else {
364 359 $this->_logger->log( 'Using cached API result.' );