A cassette (1) that is insertable into an infusion pump for delivery of a fluid to a subject that has a housing with two ends for holding flexible tubing (75) through which the fluid is directed. The housing has an open area exposing the tubing, which engages a pumping mechanism when inserted into an infusion pump. An anti-flow valve mechanism (100) associated with the tubing or the cassette and present either in, on or near the housing is made up of a piston (103/105) and spring (110), where the spring biases the piston against the tubing to prevent fluid flow.