Using ram as cachedisk in firefox increases productivity of flash (ex. watching youtube).
First you have to do is create ramdisk using this command:
# diskutil erasevolume HFS+ "ramdisk" `hdiutil attach -nomount ram://1165430`
Next step is specify path to ramdisk in Firefox. Open new tab (or window) and type about:config.
Now you have to add new variable called browser.cache.disk.parent_directory with path to your created disk.
Set size of files which will be saved in your diskspace (browser.cache.disk.capacity) – for example 1165430 (550Mb).
To enable memory caching click double on browser.cache.memory.enable.