I am writing a thesis, using a customized document class that I haven't created, but seems to function similarly to article. I have been using longtable for my tables, but am struggling to make the captions single spaced without affecting the spacing of the table contents. I am using the longtable and setspacing packages, and have used \renewcommand{\arraystretch}{0.7} to make the text within the table 0.7 spaced.
I would now like to make the captions single spaced, but am not sure how to separate the command for the caption and for the table contents.
longtable caption formatting had a similar question and \AtBeginEnvironment{longtable}{\linespread{1}\selectfont} was recommended, however that changes the spacing for the whole table, not just the caption. I have tried \captionsetup[longtable]{\linespread{1}\selectfont} however this seems to crash LaTeX.
I feel as though this should be quite simple, and that something along the lines of \AtBeginEnvironment{longtable}{\singlespacing} should be all it takes, though that produces errors (I assume because I already have the \arraystretch command in there). If someone can point me in the right direction it would be greatly appreciated!