Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always initialize cachefs. #21

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/Shpasser/GaeSupportL5/Foundation/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -257,4 +261,4 @@ public function storagePath()
return parent::storagePath();
}

}
}
3 changes: 2 additions & 1 deletion src/Shpasser/GaeSupportL5/Setup/Configurator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
);

Expand Down Expand Up @@ -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
Expand Down