Ideally, it’s in the NAS. I use a 5-bay unit (1522+), and use one bay for the SSD; you can read about this configuration here:
If you scroll down to the section labeled Can You Use the M.2 Cache Slot for Your Roon Database? you will see how you can use that slot to achieve something similar in a 4-bay NAS like a DS925+