Logic for expiration and path