/** * Adds a translation for given key (No existence check!) * * @param string $translateKey * @param string $message * @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])); }