Skip to content

Commit f60bfd9

Browse files
authored
Merge pull request #1588 from multiversx/bon-configs
adjust cache
2 parents 06f48d5 + 5cdc0a1 commit f60bfd9

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/utils/cache.info.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { TpsInterval } from "src/endpoints/tps/entities/tps.interval";
55

66
export class CacheInfo {
77
key: string = "";
8-
ttl: number = Constants.oneSecond() * 6;
8+
ttl: number = Constants.oneSecond();
99

1010
static About: CacheInfo = {
1111
key: 'about',
@@ -54,7 +54,7 @@ export class CacheInfo {
5454

5555
static TransactionPool: CacheInfo = {
5656
key: 'txpool',
57-
ttl: Constants.oneSecond() * 6,
57+
ttl: Constants.oneSecond(),
5858
};
5959

6060
static ApplicationMostUsed: CacheInfo = {
@@ -101,20 +101,20 @@ export class CacheInfo {
101101
static TxCount(address: string): CacheInfo {
102102
return {
103103
key: `txCount:${address}`,
104-
ttl: Constants.oneSecond() * 30,
104+
ttl: Constants.oneSecond() * 5,
105105
};
106106
}
107107

108108
static Transactions(queryPagination: QueryPagination): CacheInfo {
109109
return {
110110
key: `transactions:${queryPagination.from}:${queryPagination.size}`,
111-
ttl: Constants.oneSecond() * 6,
111+
ttl: Constants.oneSecond(),
112112
};
113113
}
114114

115115
static TransactionsCount: CacheInfo = {
116116
key: 'transactions:count',
117-
ttl: Constants.oneSecond() * 6,
117+
ttl: Constants.oneSecond(),
118118
};
119119

120120
static IdentityProfilesKeybases: CacheInfo = {
@@ -559,7 +559,7 @@ export class CacheInfo {
559559
static BlocksCount(filter: BlockFilter): CacheInfo {
560560
return {
561561
key: `blocks:count:${JSON.stringify(filter)}`,
562-
ttl: Constants.oneSecond() * 6,
562+
ttl: Constants.oneSecond(),
563563
};
564564
}
565565

@@ -574,7 +574,7 @@ export class CacheInfo {
574574

575575
private static computeBlocksLatestTtl(ttl?: number): number {
576576
if (ttl === undefined || ttl <= Constants.oneMinute() * 5) {
577-
return Constants.oneSecond() * 12;
577+
return Constants.oneSecond() * 2;
578578
}
579579

580580
if (ttl <= Constants.oneHour()) {

0 commit comments

Comments
 (0)