Check yout scratch drives in PS's preferences. You need a lot of ram for big images but a big empty scratch drive is just as important, the best you can do is to have a seperate partition on a hard drive you arent using whilst using photoshop (on a second hard disk, not a second partition of your primary drive), idealy with nothing but empty space in it. Fast drives are always better too of course. When I use heavy files with photshop I use a blank partition of my external hard drive as a scratch drive, since I only have a laptop and the HD in that in pretty slow 😉
Also if the problem is with your cache file filling up you might be able to just wait it out, event the application isnt responding if you wait half an hour or so it might sort itself out, but your best bet it to set up a large scratch drive and throw some ram at it, and photoshop will love you forever like a little puppy. Also, it likes to be walked outside at least once a day 😀