Magestead\Installers\Magento2Project::configureRedis PHP Method

configureRedis() protected method

protected configureRedis ( $projectPath, Symfony\Component\Console\Output\OutputInterface $output )
$projectPath
$output Symfony\Component\Console\Output\OutputInterface
    protected function configureRedis($projectPath, OutputInterface $output)
    {
        $output->writeln('<comment>Configuring Redis Cache</comment>');
        $file = "{$projectPath}/public/app/etc/env.php";
        $env = (include $file);
        $env['cache'] = ['frontend' => ['default' => ['backend' => 'Cm_Cache_Backend_Redis', 'backend_options' => ['server' => '127.0.0.1', 'port' => '6379', 'persistent' => '', 'database' => '0', 'force_standalone' => '0', 'connect_retries' => '1', 'read_timeout' => '10', 'automatic_cleaning_factor' => '0', 'compress_data' => '1', 'compress_tags' => '1', 'compress_threshold' => '20480', 'compression_lib' => 'gzip']], 'page_cache' => ['backend' => 'Cm_Cache_Backend_Redis', 'backend_options' => ['server' => '127.0.0.1', 'port' => '6379', 'persistent' => '', 'database' => '1', 'force_standalone' => '0', 'connect_retries' => '1', 'read_timeout' => '10', 'automatic_cleaning_factor' => '0', 'compress_data' => '0', 'compress_tags' => '1', 'compress_threshold' => '20480', 'compression_lib' => 'gzip']]]];
        file_put_contents($file, "<?php \n \n return " . var_export($env, true) . ";");
    }