/** * @param Post $Post */ public function savePost(Post $Post) { $tags = $Post->get(Post::FIELD_TAGS); foreach ($tags as $tag) { $this->getRedis()->zadd($this->getFeedName($tag), [$Post->getId() => $Post->get(Post::FIELD_CREATE_AT)]); } }
/** * @param Post $Post */ public function savePost(Post $Post) { $ownerId = $Post->getOwner()->getId(); $this->getRedis()->zadd($this->getFeedName($ownerId), [$Post->getId() => $Post->get(Post::FIELD_CREATE_AT)]); }
/** * @param Post $Post */ public function savePost(Post $Post) { $this->getRedis()->zadd($this->getFeedName(), [$Post->getId() => $Post->get(Post::FIELD_CREATE_AT)]); }