Skip to content

Commit 366f623

Browse files
author
Chris Åkerfeldt Wendel
committed
fix: Stop the cache, since it doesn't work.
1 parent 15c0397 commit 366f623

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

CFLookup/SharedMethods.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@ public async static Task<List<Category>> GetCategoryInfo(IDatabaseAsync _redis,
6161

6262
public async static Task<(Mod? mod, CurseForge.APIClient.Models.Files.File? file, string? changelog)> GetFileInfoAsync(IDatabaseAsync _redis, ApiClient _cfApiClient, int fileId)
6363
{
64-
var cachedFile = await _redis.StringGetAsync($"cf-fileinfo-{fileId}");
64+
//var cachedFile = await _redis.StringGetAsync($"cf-fileinfo-{fileId}");
6565

66-
if (!cachedFile.IsNullOrEmpty)
67-
{
68-
return JsonSerializer.Deserialize<(Mod? mod, CurseForge.APIClient.Models.Files.File file, string changelog)>(cachedFile);
69-
}
66+
//if (!cachedFile.IsNullOrEmpty)
67+
//{
68+
// return JsonSerializer.Deserialize<(Mod? mod, CurseForge.APIClient.Models.Files.File file, string changelog)>(cachedFile);
69+
//}
7070

7171
var file = await _cfApiClient.GetFilesAsync(new GetModFilesRequestBody
7272
{
@@ -80,7 +80,7 @@ public async static Task<List<Category>> GetCategoryInfo(IDatabaseAsync _redis,
8080

8181
var changelog = await _cfApiClient.GetModFileChangelogAsync(file.Data[0].ModId, fileId);
8282

83-
await _redis.StringSetAsync($"cf-fileinfo-{fileId}", JsonSerializer.Serialize((mod, file.Data[0], changelog.Data)), TimeSpan.FromMinutes(5));
83+
//await _redis.StringSetAsync($"cf-fileinfo-{fileId}", JsonSerializer.Serialize((mod, file.Data[0], changelog.Data)), TimeSpan.FromMinutes(5));
8484

8585
return (mod, file.Data[0], changelog.Data);
8686
}

0 commit comments

Comments
 (0)