Skip to content

Instantly share code, notes, and snippets.

@meetai
meetai / osx_ramdisk.sh
Last active August 29, 2015 14:15 — forked from jnschulze/osx_ramdisk.sh
OSX: Move cache folders to RAM
#!/bin/bash
# Size at the end is * 2048 where 2048 = 1 MB, so 1572864 = 768 MB
#DISK=`/usr/bin/hdiutil attach -nobrowse -nomount ram://1572864`
DISK=`/usr/bin/hdiutil attach -nobrowse -nomount ram://2097152`
/usr/sbin/diskutil erasevolume HFS+ "RamDiskCache" $DISK
CACHEDIR="/Volumes/RamDiskCache/$USER"
// To turn on JS Aggregation
drush vset preprocess_js 1
// To clear all Cache
drush cc all
// To disable JS Aggregation
drush vset preprocess_js 0
// To clear cache of JS and CSS only