/**
  * {@inheritdoc}
  */
 public function createAndPersist(ActionInterface $action, ComponentInterface $subject, $context = 'GLOBAL', $type = TimelineInterface::TYPE_TIMELINE)
 {
     $redisKey = $this->getRedisKey($subject, $context, $type);
     $this->persistedDatas[] = array('zAdd', $redisKey, $action->getSpreadTime(), $action->getId());
     // we want to deploy on a subject action list to enable ->getSubjectActions feature..
     if ('timeline' === $type) {
         $redisKey = $this->getSubjectRedisKey($action->getSubject());
         $this->persistedDatas[] = array('zAdd', $redisKey, $action->getSpreadTime(), $action->getId());
     }
 }
 /**
  * {@inheritdoc}
  */
 public function updateAction(ActionInterface $action)
 {
     $action->setId($this->getNextId());
     $this->client->hset($this->getActionKey(), $action->getId(), serialize($action));
     $this->deployActionDependOnDelivery($action);
 }