stripe_id}:".($subscription->updated_at?->timestamp ?? 0); return Cache::remember($cacheKey, now()->addMinutes(10), function () use ($subscription): ?array { try { $stripe = $subscription->asStripeSubscription(); $renewsAt = $stripe->items->data[0]->current_period_end ?? null; if (! $renewsAt) { return null; } return [ 'booked_at' => Carbon::createFromTimestamp($stripe->start_date), 'renews_at' => Carbon::createFromTimestamp($renewsAt), ]; } catch (Throwable) { return null; } }); } }