Test if required item exists in the cache.

def has_item(self, url):
        """
        Test if required item exists in the cache.
        """

        _hash = self.build_hash(url)
        self.execute('BEGIN')
        self.execute('''
            SELECT id
            FROM cache
            WHERE id = x%s
            LIMIT 1
        ''', (_hash,))
        row = self.cursor.fetchone()
        self.execute('COMMIT')
        return True if row else False