diff --git a/src/Shpasser/GaeSupportL5/Foundation/Application.php b/src/Shpasser/GaeSupportL5/Foundation/Application.php index a9e51e4..7e948d2 100644 --- a/src/Shpasser/GaeSupportL5/Foundation/Application.php +++ b/src/Shpasser/GaeSupportL5/Foundation/Application.php @@ -51,10 +51,14 @@ public function __construct($basePath = null) $this->detectGae(); + if(env('GAE_USE_CACHEFS')) + { + $this->initializeCacheFs($basePath); + } + if ($this->isRunningOnGae()) { $this->replaceDefaultSymfonyLineDumpers(); - $this->initializeCacheFs($basePath); } parent::__construct($basePath); @@ -257,4 +261,4 @@ public function storagePath() return parent::storagePath(); } -} \ No newline at end of file +} diff --git a/src/Shpasser/GaeSupportL5/Setup/Configurator.php b/src/Shpasser/GaeSupportL5/Setup/Configurator.php index 5cc5fd3..c9a873d 100644 --- a/src/Shpasser/GaeSupportL5/Setup/Configurator.php +++ b/src/Shpasser/GaeSupportL5/Setup/Configurator.php @@ -324,7 +324,7 @@ protected function replaceCompiledPath($contents) { $modified = preg_replace( "/'compiled'\s*=>.*$/m", - "'compiled' => env('COMPILED_PATH', storage_path().'/framework/views'),", + "'compiled' => (env('GAE_USE_CACHEFS') ? 'cachefs:/' : storage_path()) . '/framework/views',", $contents ); @@ -586,6 +586,7 @@ protected function generateAppYaml($appId, $filePath, $publicPath) - ^(.*/)?\.DS_Store$ env_variables: + GAE_USE_CACHEFS: true GAE_CACHE_SERVICES_FILE: false GAE_CACHE_CONFIG_FILE: false GAE_CACHE_ROUTES_FILE: false