I was at the show this year, and stayed in St Andrews. I left at about 17:30, and it took me about 30mins to get to my B&B, so I must have missed the worst of it.
In the past I have 'parked and cycled', I stayed in the Clayton Caravan Park, which is between Dairsie and Guardbridge, 56deg 21minN, 2deg55minW (aprox!). Looking on Google, they still seem to have touring caravan pitches if that is how you intend to do things.