I am building a new computer and have heard that, no matter how much RAM you have, Photoshop always writes the scratch file to a disk. Thus, considering a second small SSD drive to use for scratch and Windows page. Other people have said that if have enough RAM, Photoshop never uses disk. Which is true?
Photoshop creates a scratch disk the instant you create a new document or open an existing image file. ALWAYS, no exceptions.
It sets its size on calculations it makes based on document size, number of layers, history states, etc.
It moves stuff from the scratch to RAM (and back) as needed.
A dedicated, physically separate drive for scratch is essential, in my personal opinion, always.
The SSD drive is a great idea, but don't make it too small. 150 GB or more is desirable.
I have seen the scratch surpass 220 Gb on occasion.