Test if flush_cache is called