mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2025-05-11 21:25:40 +02:00
fix: Cache SB stats up to 1 hour, or until the user creates a new segment
This commit is contained in:
parent
98d2771db7
commit
30c8f86846
2 changed files with 3 additions and 1 deletions
|
@ -14,7 +14,7 @@ public class UserStats {
|
|||
/**
|
||||
* How long to cache user stats objects.
|
||||
*/
|
||||
private static final long STATS_EXPIRATION_MILLISECONDS = 5 * 60 * 1000; // 5 minutes.
|
||||
private static final long STATS_EXPIRATION_MILLISECONDS = 60 * 60 * 1000; // 60 minutes.
|
||||
|
||||
private final String privateUserId;
|
||||
public final String publicUserId;
|
||||
|
|
|
@ -184,6 +184,8 @@ public class SBRequester {
|
|||
Utils.showToastLong(str("revanced_sb_submit_failed_unknown_error", 0, ex.getMessage()));
|
||||
} catch (Exception ex) {
|
||||
Logger.printException(() -> "failed to submit segments", ex); // Should never happen.
|
||||
} finally {
|
||||
lastFetchedStats = null; // Fetch updated stats if needed.
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue