c:cpu NOCACHE will turn off your caches.
So something like:
c:cpu NOCACHE
gg FAST
c:cpu CACHE
will turn it back on. Run the script with execute, or make it executable: protect script +E
Check the cpu command for more info "cpu ?"
Edit: Oh, just saw: you saying that the c:cpu CACHE part will not execute after gg exits...