|
@@ -286,7 +286,16 @@ class SyncMail { |
|
@@ -286,7 +286,16 @@ class SyncMail { |
286
|
$p++;
|
286
|
$p++;
|
287
|
|
287
|
|
288
|
foreach ($uids as $k=>$uid){
|
288
|
foreach ($uids as $k=>$uid){
|
289
|
- if($this->db->cache(86400*30,false)->value(listsSql::first(dbWhere(['email_id'=>$this->emailId(),'folder_id'=>$folder_id,'uid'=>$uid]),'count(*) as c'))){
|
289
|
+
|
|
|
290
|
+ $has = redis()->get('h_'.$folder_id.'_'.$uid,function () use ($folder_id,$uid){
|
|
|
291
|
+ $num = $this->db->value(listsSql::first(dbWhere(['email_id'=>$this->emailId(),'folder_id'=>$folder_id,'uid'=>$uid]),'count(*) as c'));
|
|
|
292
|
+ if($num){
|
|
|
293
|
+ redis()->set('h_'.$folder_id.'_'.$uid,1,86400);
|
|
|
294
|
+ }
|
|
|
295
|
+ return $num;
|
|
|
296
|
+ });
|
|
|
297
|
+
|
|
|
298
|
+ if($has){
|
290
|
unset($uids[$k]);
|
299
|
unset($uids[$k]);
|
291
|
}
|
300
|
}
|
292
|
}
|
301
|
}
|