wzq 5 years ago
parent
commit
d265218344
1 changed files with 2 additions and 1 deletions
  1. 2 1
      app/Transformers/Post/SuggestTransformer.php

+ 2 - 1
app/Transformers/Post/SuggestTransformer.php

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