protected function isExpired($key, $storageArray = null)
    {
        if (!empty($key)) {
            // Item is expired if key doesn't exist
            if (!$this->containsKey($key))
                return true;

            $storageArray = $this->readFile($this->file($key));
        }

        if (is_array($storageArray)) {
            if ($storageArray['expires'] >= time() && $storageArray['duration'] > 0)
                return true;
            else
                return false;
        } else {
            throw new CacheException("isExpired called incorrectly. key = '{$key}', storageArray = '{$storageArray}'");
        }
    }
protected function isExpired($key, $storageArray = null)
    {
        if (!empty($key)) {
            // Item is expired if key doesn't exist
            if (!$this->containsKey($key))
                return true;

            $storageArray = $this->readFile($this->file($key));
        }

        if (is_array($storageArray)) {
            if ($storageArray['expires'] >= time() && $storageArray['duration'] > 0)
                return true;
            else
                return false;
        } else {
            throw new CacheException("isExpired called incorrectly. key = '{$key}', storageArray = '{$storageArray}'");
        }
    }
protected function isExpired ( $ key , $ storageArray = null ) { if ( ! empty ( $ key ) ) { // Item is expired if key doesn't exist if ( ! $ this -> containsKey ( $ key ) ) return true ; $ storageArray = $ this -> readFile ( $ this -> file ( $ key ) ) ; } if ( is_array ( $ storageArray ) ) { if ( $ storageArray [ 'expires' ] >= time ( ) && $ storageArray [ 'duration' ] > 0 ) return true ; else return false ; } else { throw new CacheException ( "isExpired called incorrectly. key = '{$key}', storageArray = '{$storageArray}'" ) ; } }
Determines if the key or storage array specified is expired

@param string $key          The key used to lookup the data.
If doesn't exist, item is expired, so true is returned.
This value may be null if a value is specified for $storageArray
@param array  $storageArray The stored value to check (in case it's already loaded)

@return boolean true if the data is expired, false otherwise
Determines if the key or storage array specified is expired