includes/managers/class-fs-cache-manager.php
function has_valid( $key, $expiration = null ) {
            $cache_entry = $this->_options->get_option( $key, false );

            $is_valid = ( is_object( $cache_entry ) &&
                          isset( $cache_entry->timestamp ) &&
                          is_numeric( $cache_entry->timestamp ) &&
                          $cache_entry->timestamp > WP_FS__SCRIPT_START_TIME
            );

            if ( $is_valid &&
                 is_numeric( $expiration ) &&
                 isset( $cache_entry->created ) &&
                 is_numeric( $cache_entry->created ) &&
                 $cache_entry->created + $expiration < WP_FS__SCRIPT_START_TIME
            ) {
                /**
                 * Even if the cache is still valid, since we are checking for validity
                 * with an explicit expiration period, if the period has past, return
                 * `false` as if the cache is invalid.
                 *
                 * @since 1.2.2.7
                 */
                $is_valid = false;
            }

            return $is_valid;
        }
function has_valid( $key, $expiration = null ) {
            $cache_entry = $this->_options->get_option( $key, false );

            $is_valid = ( is_object( $cache_entry ) &&
                          isset( $cache_entry->timestamp ) &&
                          is_numeric( $cache_entry->timestamp ) &&
                          $cache_entry->timestamp > WP_FS__SCRIPT_START_TIME
            );

            if ( $is_valid &&
                 is_numeric( $expiration ) &&
                 isset( $cache_entry->created ) &&
                 is_numeric( $cache_entry->created ) &&
                 $cache_entry->created + $expiration < WP_FS__SCRIPT_START_TIME
            ) {
                /**
                 * Even if the cache is still valid, since we are checking for validity
                 * with an explicit expiration period, if the period has past, return
                 * `false` as if the cache is invalid.
                 *
                 * @since 1.2.2.7
                 */
                $is_valid = false;
            }

            return $is_valid;
        }
function has_valid ( $ key , $ expiration = null ) { $ cache_entry = $ this -> _options -> get_option ( $ key , false ) ; $ is_valid = ( is_object ( $ cache_entry ) && isset ( $ cache_entry -> timestamp ) && is_numeric ( $ cache_entry -> timestamp ) && $ cache_entry -> timestamp > WP_FS__SCRIPT_START_TIME ) ; if ( $ is_valid && is_numeric ( $ expiration ) && isset ( $ cache_entry -> created ) && is_numeric ( $ cache_entry -> created ) && $ cache_entry -> created + $ expiration < WP_FS__SCRIPT_START_TIME ) { /**
                 * Even if the cache is still valid, since we are checking for validity
                 * with an explicit expiration period, if the period has past, return
                 * `false` as if the cache is invalid.
                 *
                 * @since 1.2.2.7
                 */ $ is_valid = false ; } return $ is_valid ; }
Check if there's a valid cached item.

@author Vova Feldman (@svovaf)
@since  1.1.6

@param string   $key
@param null|int $expiration Since 1.2.2.7

@return bool
Check if there s a valid cached item .