add purge support & fix data race when call Len()