move replay cache purging into library function
update todo