Implemented cache reset for Gmail history id expiration. (#581)

This commit is contained in:
Burak Kaan Köse
2025-02-22 23:09:53 +01:00
committed by GitHub
parent bd5b51c62f
commit 7e05d05f94
16 changed files with 204 additions and 36 deletions

View File

@@ -176,4 +176,22 @@ public class MimeFileService : IMimeFileService
return renderingModel;
}
public async Task DeleteUserMimeCacheAsync(Guid accountId)
{
var mimeFolderPath = await _nativeAppService.GetMimeMessageStoragePath().ConfigureAwait(false);
var mimeDirectory = Path.Combine(mimeFolderPath, accountId.ToString());
try
{
if (Directory.Exists(mimeDirectory))
{
Directory.Delete(mimeDirectory, true);
}
}
catch (Exception ex)
{
Log.Error(ex, "Failed to remove user's mime cache folder.");
}
}
}