|
@@ -2,13 +2,22 @@
|
|
\Ubiquity\cache\CacheManager::startProd($config);
|
|
\Ubiquity\cache\CacheManager::startProd($config);
|
|
\Ubiquity\orm\DAO::setModelsDatabases([
|
|
\Ubiquity\orm\DAO::setModelsDatabases([
|
|
'models\\Fortune' => 'pgsql',
|
|
'models\\Fortune' => 'pgsql',
|
|
- 'models\\World' => 'pgsql'
|
|
|
|
|
|
+ 'models\\World' => 'pgsql',
|
|
|
|
+ 'models\\CachedWorld'=>'pgsql-cache'
|
|
]);
|
|
]);
|
|
|
|
+
|
|
|
|
+\Ubiquity\orm\DAO::setCache(new \Ubiquity\cache\dao\DAOMemoryCache());
|
|
|
|
+
|
|
|
|
+echo "Loading worlds\n";
|
|
|
|
+\Ubiquity\orm\DAO::warmupCache('models\\CachedWorld','',false);
|
|
|
|
+echo "End Loading worlds\n";
|
|
|
|
+
|
|
\Ubiquity\cache\CacheManager::warmUpControllers([
|
|
\Ubiquity\cache\CacheManager::warmUpControllers([
|
|
'controllers\\Plaintext_',
|
|
'controllers\\Plaintext_',
|
|
'controllers\\Json_',
|
|
'controllers\\Json_',
|
|
'controllers\\DbPg',
|
|
'controllers\\DbPg',
|
|
- 'controllers\\Fortunes_'
|
|
|
|
|
|
+ 'controllers\\Fortunes_',
|
|
|
|
+ 'controllers\\Cache'
|
|
]);
|
|
]);
|
|
$workerServer->onWorkerStart = function () use ($config) {
|
|
$workerServer->onWorkerStart = function () use ($config) {
|
|
\Ubiquity\orm\DAO::startDatabase($config, 'pgsql');
|
|
\Ubiquity\orm\DAO::startDatabase($config, 'pgsql');
|