public function read($hash, $namespace = null)
    {
        $data = false;

        // Check namespace first
        if (!is_null($namespace) && is_null($hash)) {
            $data = $this->Database->fetch("
                SELECT SQL_NO_CACHE *
                FROM `tbl_cache`
                WHERE `namespace` = '$namespace'
                AND (`expiry` IS NULL OR UNIX_TIMESTAMP() <= `expiry`)
            ");
        }

        // Then check hash
        if (!is_null($hash)) {
            $data = $this->Database->fetchRow(0, "
                SELECT SQL_NO_CACHE *
                FROM `tbl_cache`
                WHERE `hash` = '$hash'
                AND (`expiry` IS NULL OR UNIX_TIMESTAMP() <= `expiry`)
                LIMIT 1
            ");
        }

        // If the data exists, see if it's still valid
        if ($data) {
            if (!$data['data'] = Cacheable::decompressData($data['data'])) {
                $this->delete($hash, $namespace);

                return false;
            }

            return $data;
        }

        $this->delete(null, $namespace);

        return false;
    }