Rear derailleurs (RD) usually have both a largest sprocket (which is generally hard to exceed although some people have 'work-arounds') and a capacity listed. Both these limits are expressed in 'teeth'.
Capacity = (biggest chainring - smallest chainring) + (biggest sprocket - smallest sprocket)
eg:
Shimano Sora 9 Speed Rear Derailleur
37 tooth total capacity, rear sprocket size range 11-32T (Short Cage)
41 tooth total capacity, rear sprocket size range 11-32T (Long Cage)
Look at an example with, say, a 9-speed cassette of 12-13-14-15-17-19-21-24-27 and using a compact 50-34 chainset. Normal calculation requires a cage where the capacity = (50-34) + (27-12) . . . = 16+15=31 teeth - SS is fine. But if you use a triple eg 52-42-30 and a 11-28 cassette then the capacity you need is 22+17 and you'd need a GS RD as the capacity required is 39.
So with a compact unless you have a huge (ie bigger than 32) largest sprocket, the SS short cage is 'always' ok (and there is no benefit getting a GS, just in case).