I don’t think there is a set timeframe for replacing them, but they are cheap insurance so you won’t hang a valve open and flood your yard.
Here in AZ I try to replace mine every 5-6 years. Way overkill I know, but ours are subjected to some pretty brutal temps!