def METHOD_NAME(self, article: Article, data: bytes):
    """Save article in cache, either memory or disk"""
    nzo = article.nzf.nzo
    # Skip if already post-processing or fully finished
    if nzo.pp_or_finished:
        return
    # Register article for bookkeeping in case the job is deleted
    nzo.add_saved_article(article)
    if article.lowest_partnum and not (article.nzf.import_finished or article.nzf.filename_checked):
        # Write the first-fetched articles to temporary file unless downloading
        # of the rest of the parts has started or filename is verified.
        # Otherwise the cache could overflow.
        self.__flush_article_to_disk(article, data)
        return
    if self.__cache_limit:
        # Check if we exceed the limit
        data_size = len(data)
        self.reserve_space(data_size)
        if self.space_left():
            # Add new article to the cache
            self.__article_table[article] = data
        else:
            # Return the space and save to disk
            self.free_reserved_space(data_size)
            self.__flush_article_to_disk(article, data)
    else:
        # No data saved in memory, direct to disk
        self.__flush_article_to_disk(article, data)