load DO regions and plans dynamically (#368)

This commit is contained in:
Saeed Vaziry
2024-11-17 11:20:15 +01:00
committed by GitHub
parent 34c5750950
commit 57b2771c7e
2 changed files with 79 additions and 48 deletions

View File

@ -105,13 +105,6 @@ public static function plans(?int $id, ?string $region): array
return [];
}
if (Cache::get('plans-'.$id.'-'.$region)) {
return Cache::get('plans-'.$id.'-'.$region);
}
$plans = $profile->provider()->plans($region);
Cache::put('plans-'.$id.'-'.$region, $plans, 60);
return $plans;
return $profile->provider()->plans($region);
}
}