mirror of
https://github.com/grocy/grocy.git
synced 2026-04-05 20:36:15 +02:00
try apc caching for views
This commit is contained in:
parent
632870c364
commit
4f37e4a390
7
app.php
7
app.php
|
|
@ -63,15 +63,16 @@ $appContainer = new \Slim\Container([
|
||||||
'view' => function($container)
|
'view' => function($container)
|
||||||
{
|
{
|
||||||
$view_time_start = microtime(true);
|
$view_time_start = microtime(true);
|
||||||
$view = new \Slim\Views\Blade(__DIR__ . '/views', GROCY_DATAPATH . '/viewcache');
|
#$view = new \Slim\Views\Blade(__DIR__ . '/views', GROCY_DATAPATH . '/viewcache');
|
||||||
fwrite($fp, "!!!App - view load time : " . round((microtime(true) - $view_time_start),6) . "\n");
|
fwrite($fp, "!!!App - view load time : " . round((microtime(true) - $view_time_start),6) . "\n");
|
||||||
return $view;
|
|
||||||
if (!apcu_exists("views"))
|
if (!apcu_exists("views"))
|
||||||
{
|
{
|
||||||
apcu_store("views", new \Slim\Views\Blade(__DIR__ . '/views', GROCY_DATAPATH . '/viewcache'));
|
apcu_store("views", new \Slim\Views\Blade(__DIR__ . '/views', GROCY_DATAPATH . '/viewcache'));
|
||||||
}
|
}
|
||||||
|
|
||||||
return apcu_fetch("views");
|
$view = apcu_fetch("views");
|
||||||
|
fwrite($fp, "!!!App - view load time : " . round((microtime(true) - $view_time_start),6) . "\n");
|
||||||
|
return $view;
|
||||||
},
|
},
|
||||||
'LoginControllerInstance' => function($container)
|
'LoginControllerInstance' => function($container)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user