Implement flexible caching for node statuses (#2174)

This commit is contained in:
Lance Pioch
2026-02-06 07:50:20 -05:00
committed by GitHub
parent adf1249086
commit 55bda569cc

View File

@@ -358,7 +358,7 @@ class Node extends Model implements Validatable
'disk_used' => 0,
];
return cache()->remember("nodes.$this->id.statistics", now()->addSeconds(360), function () use ($default) {
return cache()->flexible("nodes.$this->id.statistics", [5, 30], function () use ($default) {
try {
$data = Http::daemon($this)