Using a RAM preview in After Effects is great as it's a quick way to preview your work. Great that is until you run out of RAM! In After Effects 6, when you run out of RAM, AE must purge frames from the buffer.
After Effects 6.5 changes this though and helps speed up your workflow. Now when the RAM cache gets full, frames are cached to your hard drive. Don't worry though, you can set a cache limit and the cache is emptied when you quit AE.
To set up disk caching:
Choose After Effects>Preferences>Memory & Cache (Edit>Preferences>Memory & Cache)
Check the checkbox to Enable Disk Cache.
The Choose Folder dialog box automatically opens and you need to specify where to write the cache. For best results place the frames on a local drive, but if possible, not the same drive as your source footage.
Specify an amount for Maximum Disk Cache Size in megabytes (the default is 2000 MB.)