From eed6ef9c8173c5da4c672e551fd9317a60ec820b Mon Sep 17 00:00:00 2001 From: Ovidiu U Date: Sun, 5 Apr 2026 20:45:28 +0100 Subject: [PATCH] fix: guard cache hit with instanceof to handle stale LocationResult entries --- app/Services/PostcodeService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Services/PostcodeService.php b/app/Services/PostcodeService.php index 2c0fd0b..e05af9d 100644 --- a/app/Services/PostcodeService.php +++ b/app/Services/PostcodeService.php @@ -28,7 +28,7 @@ class PostcodeService $cached = Cache::get($cacheKey); - if ($cached !== null) { + if ($cached instanceof LocationResult) { return $cached; }