pipeline with optional key expiry