How does this compare to hard drives? Wouldn't anything in the hard drives DRAM cache be lost in the event of a power outage as well? I assume hard drives don't cache writes, and only reads.
No. Hard drives do cache writes - but modern OSs are specially designed to work with write caches.
Let's take the example of saving a file called widget.dat. A modern OS works something like this:
1. Load directory and free space info
2. Store file data into unused areas of the drive
3. Write the following to a journal file "About to add the file widget.dat to the master directory list, the data is at sector 102345"
4. Modify the master directory to include the "widget.dat" file.
5. Write to the journal file "Master directory successfully updated with widget.dat entry"
As long as the drive guarantees that these steps occur in order, then if the comp crashes or loses power at any point - there are only 1 of 2 outcomes.
If the power is lost before step 3 completes, then the comp will reboot with no trace of widget.dat.
If the power is lost after after step 5, then widget.dat is already completely safe, and there is no corruption.
If the power is lost at step 4, then the OS during reboot sees an incomplete journal entry, and then is able to make the step 4 and 5 changes, leaving widget.dat fully savedand uncorrupted.
So, even if a drive supports write caching (which may allow the drive to reorder these steps), then the OS, will stall at critical steps (between 3 and 4, and between 4 and 5) and automatically send a "flush cache" command to the drive, forcing it to save everything from DRAM onto disk. Only once the OS gets the OK from the drive that the cache has been flushed, does it continue with the next critical step.
The write cache will accelerate "non-critical" writes, but critical writes will still require a slow flush. In order to improve performance, the most modern OSs and drives support "write barriers" which are kind of like a selective flush. The OS can select certain writes that must be completed in a critical order, and ensure that only they get flushed manually - avoiding the performance hit, of occasionally having to flush the whole cache.
The advantage of a super-cap is that the drive can safely ignore the "flush cache" command. This command is quite slow and will stall the drive and OS, especially if the cache is full, and many MB of data must be dumped to the platters or flash memory. A RAID card with capacitor, or SSD with capacitor, can use the capacitor to keep the data safe, so when a "flush" command is received, all that happens is that the drive/RAID card instantly sends back a "OK. Data saved" reponse. As a result, the OS won't stall, even during critical writes.
For certain things, like big corporate databases (where every time a record is updated in a database, this whole complex "journal, wait for cache flus, update, wait for cache flush, update journal" process is needed), the OS can spend a long time waiting for cache flushes. It is here that capacitor supported RAID cards or SSDs are a huge benefit.