| @@ -354,9 +354,11 @@ | ||
| 354 | 354 | } |
| 355 | 355 | } |
| 356 | 356 | } |
| 357 | 357 | |
| 358 | - self::$_cache->set( $cache_key, $result, $expiration ); | |
| 358 | + if ( is_numeric( $expiration ) ) { | |
| 359 | + self::$_cache->set( $cache_key, $result, $expiration ); | |
| 360 | + } | |
| 359 | 361 | |
| 360 | 362 | $cached_result = $result; |
| 361 | 363 | } else { |
| 362 | 364 | $this->_logger->log( 'Using cached API result.' ); |