Remove/reduce usage of QueryCache
This commit is contained in:
@@ -233,13 +233,6 @@ class MessageProcess implements ShouldQueue
|
||||
// Check for duplicate messages
|
||||
// FTS-0009.001
|
||||
if ($this->mo->msgid) {
|
||||
$o = ($x=Echomail::where('msgid',$this->mo->msgid)
|
||||
->where('fftn_id',$this->mo->fftn_id)
|
||||
->where('datetime','>=',$this->mo->datetime->clone()->subYears(3))
|
||||
->where('datetime','<=',$this->mo->datetime)
|
||||
->dontCache())
|
||||
->single();
|
||||
|
||||
Log::debug(sprintf('%s:- Checking for duplicate from host id [%d], with msgid [%s] between [%s] and [%s].',
|
||||
self::LOGKEY,
|
||||
$this->mo->fftn_id,
|
||||
@@ -248,6 +241,11 @@ class MessageProcess implements ShouldQueue
|
||||
$this->mo->datetime,
|
||||
));
|
||||
|
||||
$x = Echomail::where('msgid',$this->mo->msgid)
|
||||
->where('fftn_id',$this->mo->fftn_id)
|
||||
->where('datetime','>=',$this->mo->datetime->clone()->subYears(3))
|
||||
->where('datetime','<=',$this->mo->datetime);
|
||||
|
||||
if ($x->count()) {
|
||||
// @todo Actually update seenby
|
||||
Log::alert(sprintf('%s:! Duplicate echomail (%s) in [%s] from (%s) [%s] to (%s) - ignoring.',
|
||||
@@ -270,7 +268,6 @@ class MessageProcess implements ShouldQueue
|
||||
$o = Echomail::where('msg_crc',$xx=md5($this->mo->msg_crc))
|
||||
->where('fftn_id',$this->mo->fftn_id)
|
||||
->where('datetime','>',Carbon::now()->subWeek())
|
||||
->dontCache()
|
||||
->get();
|
||||
|
||||
if ($o->count())
|
||||
|
Reference in New Issue
Block a user