It reduces connection latency. You got to understand that connect to
sentinel is another connection (a different server), and if it demotes a
server the server will be as read only. And, most of the time, the server
goes offline and there is a downtime after all sentinels judge it as
objectively down.

The reason is to make the server answer as faster as it can.

I already use the feature developed credissentinelcache in  production mode
and it's working great. There was even an event where the slave server
assumed control and it worked smoothly.

Best,

Otavio
Em 25/12/2013 20:53, "Carsten Brandt" <notifications@github.com> escreveu:

> In framework/caching/CRedisSentinelCache.php:
>
> > +    return true;
> > +  }
> > +
> > +  private function saveCurrentMasterConf(){
> > +    $arConfig = array('hostname' => $this->hostname, 'port' => $this->port);
> > +    $f = fopen($this->getSentinelMasterConfFile(), 'w');
> > +    fputs($f, serialize($arConfig));
> > +    return fclose($f);
> > +  }
> > +
> > +  /**
> > +   * Remove Redis Config Cache file path
> > +   * @return true if successfully removed
> > +   */
> > +  private function removeCurrentMasterConf(){
> > +    if(!file_exists($this->getSentinelMasterConfFile())){
>
> why?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/yiisoft/yii/pull/3106/files#r8552073>
> .
>