Add a time-based cache for the progress result from the API
This commit is contained in:
Vendored
+7
-2
@@ -1,4 +1,4 @@
|
||||
interface Progress {
|
||||
interface ProgressType {
|
||||
percentageOfIpv4Scanned: number; // assuming this is a number
|
||||
totalFiltered: bigint;
|
||||
amountOfIpv4Left: bigint;
|
||||
@@ -6,4 +6,9 @@ interface Progress {
|
||||
discardedDbSize: bigint;
|
||||
filteredDbSize: bigint;
|
||||
myDbSize: bigint;
|
||||
}
|
||||
}
|
||||
|
||||
type CacheEntry<T> = {
|
||||
data: T;
|
||||
timestamp: number;
|
||||
};
|
||||
Reference in New Issue
Block a user