Answers.Body: <p>My guess is this is the cause:</p>
  
  <pre><code>'cacheMethod' =&gt; getenv('CACHE_METHOD'),
  </code></pre>
  
  <p><code>getenv('CACHE_METHOD')</code> is probably returning <code>null</code> because that environment variable isn't being set like you expect or its set to an unknown caching driver.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-08T20:11:54.787Z
Answers.LastActivityDate: 2018-11-08T20:11:54.787Z
Answers.UserDisplayName: Brad Bell
Body: <p>long time listener, first time caller.</p>
  
  <p>I'm having some issues getting localisation setup on my homestead/vagrant craft 2 site. I'm running into issues, I believe, with the craft cache when I try to visit a localised url I have set up. </p>
  
  <p>I've been following the guide <a href="https://docs.craftcms.com/v2/localization-guide.html" rel="nofollow noreferrer">here</a>, but haven't been able to have any luck with it. </p>
  
  <p>I am using the folder structure in my public folder as follows  </p>
  
  <pre><code>    /public  
        -index.php  
        -.htaccess  
        /es
          -index.php  
          -.htaccess
  </code></pre>
  
  <p>My config/general.php file is like this,</p>
  
  <pre><code>    define('URI_SCHEME', (isset($_SERVER['HTTPS'] ) ) ? "https://" : 
      "http://");
      define('SITE_URL',    URI_SCHEME.$_SERVER['SERVER_NAME']);
      define('BASEPATH',     realpath(dirname(__FILE__) . '/../'));
  
      return array(
  
  
      '*' =&gt; array(
        'appId' =&gt; 'app',
        'validationKey' =&gt; getenv('VALIDATION_KEY'),
        'devMode' =&gt; true,
        'backupDbOnUpdate' =&gt; false,
        'omitScriptNameInUrls' =&gt; true,
  
        'siteUrl' =&gt; array(
           'en' =&gt; 'http://example.test/',
           'es' =&gt; 'http://example.test/es/'
        ),
        'cacheMethod' =&gt; getenv('CACHE_METHOD'),
  
        'environmentVariables' =&gt; array(
          'basePath' =&gt; BASEPATH,
          'siteUrl'  =&gt; SITE_URL
  
        ),
       ),
  
      ),
      )
  </code></pre>
  
  <p>My public/es/index.php file is pointing to the correct craft folder and has a <code>define(CRAFT_LOCALE, 'es')</code>. I'm stuck as how to progress and any pointers or tips are very appreciated<br>
  Heres a screen shot of the actual error on example.test/es<br>
  <a href="https://i.sstatic.net/f3Nt2.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/f3Nt2.png" alt="enter image description here"></a></p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-11-02T22:13:51.297Z
Comments.Text: Is there anything else in your `config/general.php` file?  If so, can you edit the question to share the whole thing?
Comments.UserDisplayName: Brad Bell
Tags: <cache><craft2>
Title: Craft localisation caching error
ThreadText: # Craft localisation caching error
  
  (Asked by: username_0 on 2018-11-01)
  
  long time listener, first time caller.
  
  I'm having some issues getting localisation setup on my homestead/vagrant craft 2 site. I'm running into issues, I believe, with the craft cache when I try to visit a localised url I have set up.
  
  I've been following the guide [here](https://docs.craftcms.com/v2/localization-guide.html), but haven't been able to have any luck with it.
  
  I am using the folder structure in my public folder as follows
  
  ```
      /public  
        -index.php  
        -.htaccess  
        /es
          -index.php  
          -.htaccess
  
  ```
  
  My config/general.php file is like this,
  
  ```
      define('URI_SCHEME', (isset($_SERVER['HTTPS'] ) ) ? "https://" : 
      "http://");
      define('SITE_URL',    URI_SCHEME.$_SERVER['SERVER_NAME']);
      define('BASEPATH',     realpath(dirname(__FILE__) . '/../'));
  
      return array(
  
      '*' => array(
        'appId' => 'app',
        'validationKey' => getenv('VALIDATION_KEY'),
        'devMode' => true,
        'backupDbOnUpdate' => false,
        'omitScriptNameInUrls' => true,
  
        'siteUrl' => array(
           'en' => 'http://example.test/',
           'es' => 'http://example.test/es/'
        ),
        'cacheMethod' => getenv('CACHE_METHOD'),
  
        'environmentVariables' => array(
          'basePath' => BASEPATH,
          'siteUrl'  => SITE_URL
  
        ),
       ),
  
      ),
      )
  
  ```
  
  My public/es/index.php file is pointing to the correct craft folder and has a `define(CRAFT_LOCALE, 'es')`. I'm stuck as how to progress and any pointers or tips are very appreciated  
  Heres a screen shot of the actual error on example.test/es  
  [![enter image description here](https://i.sstatic.net/f3Nt2.png)](https://i.sstatic.net/f3Nt2.png)
  
  **Tags:** cache, craft2
  
  > **Comments:**
  > **username_1**: Is there anything else in your `config/general.php` file?  If so, can you edit the question to share the whole thing?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-11-08. Score: 1
  
  My guess is this is the cause:
  
  ```
  'cacheMethod' => getenv('CACHE_METHOD'),
  
  ```
  
  `getenv('CACHE_METHOD')` is probably returning `null` because that environment variable isn't being set like you expect or its set to an unknown caching driver.
  
  
  ---
  
  