Phalcon\Translate\Adapter\Redis::add PHP Method

add() public method

Adds a translation for given key (No existence check!)
public add ( string $translateKey, string $message ) : boolean
$translateKey string
$message string
return boolean
    public function add($translateKey, $message)
    {
        $index = $this->getLongKey($translateKey);
        $key = $this->getShortKey($index);
        $this->loadValueByKey($key);
        if (!isset($this->cache[$key])) {
            $this->cache[$key] = [];
        }
        $this->cache[$key][$index] = $message;
        return $this->redis->set($key, serialize($this->cache[$key]));
    }