send buffer before empty cache