Skip to content

Instantly share code, notes, and snippets.

@Swop
Created August 21, 2013 12:26
Show Gist options
  • Save Swop/6293819 to your computer and use it in GitHub Desktop.
Save Swop/6293819 to your computer and use it in GitHub Desktop.
Speed up Vagrant for Sf2 apps by placed the cache & log dir in memory
<?php
class AppKernel extends Kernel
{
// ...
public function getCacheDir()
{
if (in_array($this->environment, array('dev', 'test'))) {
return '/dev/shm/appname/cache/' . $this->environment;
}
return parent::getCacheDir();
}
public function getLogDir()
{
if (in_array($this->environment, array('dev', 'test'))) {
return '/dev/shm/appname/logs';
}
return parent::getLogDir();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment