Created
August 1, 2012 17:26
-
-
Save pghoratiu/3229011 to your computer and use it in GitHub Desktop.
Symfony1 warmup cache from CLI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once(dirname(__FILE__).'/../config/ProjectConfiguration.class.php'); | |
if (1) { | |
$configuration = ProjectConfiguration::getApplicationConfiguration('backend', 'prod', false); | |
} else { | |
$configuration = ProjectConfiguration::getApplicationConfiguration('backend', 'dev', false); | |
} | |
sfContext::createInstance($configuration); | |
// Array of URLs to browse | |
$uris = array( | |
'/', | |
'/training/class', | |
'/training/class/1/student/1', | |
'/training/class/1/company/14', | |
'/training/course', | |
'/training/course/1', | |
'/training/module/1', | |
'/training/page/1', | |
'/training/page/1/additionalinfo/edit', | |
'/training/test/1', | |
'/training/question/1', | |
'/training/answer/1', | |
'/company/company/13', | |
'/company/user/41', | |
'/training/course/1/documents/library/11', | |
'/report/report', | |
'/report/report/new', | |
'/template/template/email', | |
'/import/import', | |
'/import/import/new', | |
'import/import/9/view', | |
); | |
$b = new sfBrowser(); | |
if (1) { | |
foreach ($uris as $uri) | |
{ | |
$b->get($uri); | |
} | |
} else { | |
$b->get($uris[count($uris)-1]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment