|
@@ -33,7 +33,6 @@ class SuggestTransformer extends TransformerAbstract
|
|
|
$comment = [];
|
|
|
$commentKey = 'post_new_comment_'.$post['id'];
|
|
|
$commentData = Redis::GET($commentKey);
|
|
|
- Redis::del($commentKey);
|
|
|
if($commentData){
|
|
|
$comment = json_decode($commentData);
|
|
|
}else{
|
|
@@ -46,7 +45,8 @@ class SuggestTransformer extends TransformerAbstract
|
|
|
'content' => $item->is_delete?'该评论已被删除':$item->content,
|
|
|
];
|
|
|
}
|
|
|
-// Redis::SET($commentKey, json_encode($comment));
|
|
|
+ Redis::SET($commentKey, json_encode($comment));
|
|
|
+ Redis::EXPIRE($commentKey, 300);
|
|
|
}
|
|
|
|
|
|
$isLike = 0;
|