Remove/reduce usage of QueryCache
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 37s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m32s
Create Docker Image / Final Docker Image Manifest (push) Successful in 10s

This commit is contained in:
Deon George 2024-11-27 18:41:27 +11:00
parent 8d1dc800a5
commit 2e47fb2f9a
4 changed files with 5 additions and 7 deletions

View File

@ -50,7 +50,6 @@ class MailSend #implements ShouldQueue
->join('domains',['domains.id'=>'zones.domain_id'])
->groupBy('a.system_id','a.id','a.zone_id','addresses.region_id','a.host_id','a.node_id','a.point_id','addresses.hub_id','addresses.role')
->with(['system','zone.domain'])
->dontCache()
->get();
// Return the system we poll

View File

@ -14,7 +14,7 @@ use Illuminate\Support\Facades\Log;
use App\Classes\FTN\{Message,Packet};
use App\Exceptions\InvalidFTNException;
use App\Traits\ScopeActive;
use App\Traits\{QueryCacheableConfig,ScopeActive};
/**
* This represents an FTN AKA.
@ -48,7 +48,7 @@ use App\Traits\ScopeActive;
class Address extends Model
{
use ScopeActive,SoftDeletes;
use ScopeActive,SoftDeletes,QueryCacheableConfig;
private const LOGKEY = 'MA-';

View File

@ -13,11 +13,11 @@ use App\Classes\FTN\Message;
use App\Events\Echomail as EchomailEvent;
use App\Interfaces\Packet;
use App\Models\Casts\{CompressedStringOrNull,CollectionOrNull,UTF8StringOrNull};
use App\Traits\{MessageAttributes,MsgID,ParseAddresses,QueryCacheableConfig};
use App\Traits\{MessageAttributes,MsgID,ParseAddresses};
final class Echomail extends Model implements Packet
{
use SoftDeletes,MessageAttributes,MsgID,ParseAddresses,QueryCacheableConfig;
use SoftDeletes,MessageAttributes,MsgID,ParseAddresses;
private const LOGKEY = 'ME-';
public const UPDATED_AT = NULL;
@ -291,7 +291,6 @@ final class Echomail extends Model implements Packet
return $this->belongsToMany(Address::class,'echomail_seenby')
->select(['addresses.id','zone_id','host_id','node_id'])
->withPivot(['export_at','sent_at','sent_pkt'])
->dontCache()
->FTN2DOrder();
}

View File

@ -11,7 +11,7 @@ trait QueryCacheableConfig
{
use QueryCacheable;
public $cacheFor = 900; // cache time, in seconds
public $cacheFor = 30; // cache time, in seconds
protected static $flushCacheOnUpdate = TRUE;
public $cacheDriver = 'memcached';
}