title: Session timeout in Yii2
body: <p>I have used built in yii2 function to set session. I am not able to use built in yii2 login because of some requirement.</p>
  
  <p>So I have set session using below:</p>
  
  <blockquote>
    <p>Yii::$app->session->set('unique_code', 'xxxx');</p>
  </blockquote>
  
  <p>and in my config/main.php file</p>
  
  <pre><code>'session' =&gt; [
          // this is the name of the session cookie used for login on the frontend
          'name' =&gt; 'project-frontend',
          'timeout' =&gt; 60*60*24*30,
      ],
  </code></pre>
  
  <p>But still user is logged out from website after some time. </p>
  
  <p>So how to increase session timeout in this case?</p>