Refactor gc_cache_append_error