🐛 Fix some bugs
This commit is contained in:
@@ -402,7 +402,6 @@ public class SubscriptionService(
|
|||||||
if (subscription is { IsAvailable: false }) subscription = null;
|
if (subscription is { IsAvailable: false }) subscription = null;
|
||||||
|
|
||||||
// Cache the result if found (with 5 minutes expiry)
|
// 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;
|
return subscription;
|
||||||
@@ -434,9 +433,8 @@ public class SubscriptionService(
|
|||||||
.FirstOrDefaultAsync();
|
.FirstOrDefaultAsync();
|
||||||
if (subscription is { IsAvailable: false }) subscription = null;
|
if (subscription is { IsAvailable: false }) subscription = null;
|
||||||
|
|
||||||
// Cache the result if found (with 30 minutes expiry)
|
// 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(30));
|
|
||||||
|
|
||||||
return subscription;
|
return subscription;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user