implement time-to-live for effects