use transient to store max purchase id, and invalidate on purchase log insert.