(prune_cache): Add fd argument. Write response to fd after the cache has