| @@ -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. |