public function getCache($key)
    {
        if ($this->sqlInitialized()) {
            if ($this->sql) {
                $_key = $this->sql->real_escape_string($key);
                if ($this->lifetime == self::IMMORTAL_LIFETIME) {
                    if ($response = $this->sql->query("
                        SELECT *
                            FROM `{$this->table}`
                            WHERE
                                `{$this->key}` = '$_key' AND
                                `expire` IS NULL
                    ")) {
                        if ($cache = $response->fetch_assoc()) {
                            return unserialize($cache[$this->cache]);
                        }
                    }
                } else {
                    $liveCache = date('Y-m-d H:i:s', time() - $this->lifetime);
                    if ($response = $this->sql->query("
                        SELECT *
                            FROM `{$this->table}`
                            WHERE
                                `{$this->key}` = '$_key' AND (
                                    (
                                        `timestamp` > '{$liveCache}' AND
                                        `expire` IS NULL
                                    ) OR (
                                        `expire` > NOW()
                                    )
                                )
                    ")) {
                        if ($cache = $response->fetch_assoc()) {
                            return unserialize($cache[$this->cache]);
                        }
                    }
                }
            }
            return false;
        }
    }
public function getCache($key)
    {
        if ($this->sqlInitialized()) {
            if ($this->sql) {
                $_key = $this->sql->real_escape_string($key);
                if ($this->lifetime == self::IMMORTAL_LIFETIME) {
                    if ($response = $this->sql->query("
                        SELECT *
                            FROM `{$this->table}`
                            WHERE
                                `{$this->key}` = '$_key' AND
                                `expire` IS NULL
                    ")) {
                        if ($cache = $response->fetch_assoc()) {
                            return unserialize($cache[$this->cache]);
                        }
                    }
                } else {
                    $liveCache = date('Y-m-d H:i:s', time() - $this->lifetime);
                    if ($response = $this->sql->query("
                        SELECT *
                            FROM `{$this->table}`
                            WHERE
                                `{$this->key}` = '$_key' AND (
                                    (
                                        `timestamp` > '{$liveCache}' AND
                                        `expire` IS NULL
                                    ) OR (
                                        `expire` > NOW()
                                    )
                                )
                    ")) {
                        if ($cache = $response->fetch_assoc()) {
                            return unserialize($cache[$this->cache]);
                        }
                    }
                }
            }
            return false;
        }
    }
public function getCache ( $ key ) { if ( $ this -> sqlInitialized ( ) ) { if ( $ this -> sql ) { $ _key = $ this -> sql -> real_escape_string ( $ key ) ; if ( $ this -> lifetime == self :: IMMORTAL_LIFETIME ) { if ( $ response = $ this -> sql -> query ( "
                        SELECT *
                            FROM `{$this->table}`
                            WHERE
                                `{$this->key}` = '$_key' AND
                                `expire` IS NULL
                    " ) ) { if ( $ cache = $ response -> fetch_assoc ( ) ) { return unserialize ( $ cache [ $ this -> cache ] ) ; } } } else { $ liveCache = date ( 'Y-m-d H:i:s' , time ( ) - $ this -> lifetime ) ; if ( $ response = $ this -> sql -> query ( "
                        SELECT *
                            FROM `{$this->table}`
                            WHERE
                                `{$this->key}` = '$_key' AND (
                                    (
                                        `timestamp` > '{$liveCache}' AND
                                        `expire` IS NULL
                                    ) OR (
                                        `expire` > NOW()
                                    )
                                )
                    " ) ) { if ( $ cache = $ response -> fetch_assoc ( ) ) { return unserialize ( $ cache [ $ this -> cache ] ) ; } } } } return false ; } }
Get available cached data

@param string $key

@return mixed|boolean Returns the cached data or `FALSE` if no data cached
Get available cached data