title: How to update redis cache in Yii 1
body: <p>I am trying to re-set the cache but every time I did that, the expiration time kept alive. How can I UPDATE the redis cache without effect the expiration time. </p>
  
  <pre><code>$cache = Yii::app()-&gt;cache;
  if($cache-&gt;get($md5)){
      $md5Values = $cache-&gt;get($md5);
      $md5Values['repetition'] +=1;
      $md5Values['priority'] = 2;var_dump($cache-&gt;get($md5));
      $cache-&gt;set($md5,$md5Values);
      if ($md5Values['repetition'] &gt; 10 &amp;&amp; $md5Values['repetition'] &lt;= 1000){
  
          $md5Values['priority'] = 1;
          $cache-&gt;set($md5,$md5Values);
          var_dump($cache-&gt;get($md5));
          return  array('priority'=&gt;1);
      } elseif ($md5Values['repetition'] &gt; 1000){
          $md5Values['priority'] = 0;
          $cache-&gt;set($md5,$md5Values);
          return  array('priority'=&gt;0);
      }
      return false;
  }else{
      $cacheArray=array();
      $cacheArray['repetition'] = 1;
      $cacheArray['priority'] = 2;
      $cache-&gt;set($md5,$cacheArray,30);
      return false;
  } 
  </code></pre>