From da57936d920e3e273ecac430619916140a5a6521 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sat, 9 Aug 2025 23:58:23 +0800 Subject: [PATCH] :bug: Fix some bugs --- DysonNetwork.Pass/Wallet/SubscriptionService.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/DysonNetwork.Pass/Wallet/SubscriptionService.cs b/DysonNetwork.Pass/Wallet/SubscriptionService.cs index d7a3b98..0f458c6 100644 --- a/DysonNetwork.Pass/Wallet/SubscriptionService.cs +++ b/DysonNetwork.Pass/Wallet/SubscriptionService.cs @@ -402,8 +402,7 @@ public class SubscriptionService( if (subscription is { IsAvailable: false }) subscription = null; // Cache the result if found (with 5 minutes expiry) - if (subscription != null) - await cache.SetAsync(cacheKey, subscription, TimeSpan.FromMinutes(5)); + await cache.SetAsync(cacheKey, subscription, TimeSpan.FromMinutes(5)); return subscription; } @@ -434,9 +433,8 @@ public class SubscriptionService( .FirstOrDefaultAsync(); if (subscription is { IsAvailable: false }) subscription = null; - // Cache the result if found (with 30 minutes expiry) - if (subscription != null) - await cache.SetAsync(cacheKey, subscription, TimeSpan.FromMinutes(30)); + // Cache the result if found (with 5 minutes expiry) + await cache.SetAsync(cacheKey, subscription, TimeSpan.FromMinutes(5)); return subscription; }