Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

chore(cache): bump read through promise cache capacity #62

Merged
merged 2 commits into from
Nov 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/api/warp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
EvaluatedContractState
> = new ReadThroughPromiseCache({
cacheParams: {
cacheCapacity: 100,
cacheCapacity: 10_000,
cacheTTL: 1000 * 30, // 30 seconds
},
readThroughFunction: readThroughToContractState,
Expand All @@ -99,7 +99,7 @@
constructor(
public readonly contractTxId: string,
public readonly functionName: string,
public readonly input: any,

Check warning on line 102 in src/api/warp.ts

View workflow job for this annotation

GitHub Actions / build (lint:check)

Unexpected any. Specify a different type
public readonly warp: Warp,
public readonly evaluationOptions: Partial<EvaluationOptions>,
public readonly logger?: winston.Logger,
Expand Down Expand Up @@ -127,7 +127,7 @@
}
> = new ReadThroughPromiseCache({
cacheParams: {
cacheCapacity: 100,
cacheCapacity: 1_000,
cacheTTL: 1000 * 30, // 30 seconds
},
readThroughFunction: readThroughToContractReadInteraction,
Expand Down Expand Up @@ -259,8 +259,8 @@
return new NotFoundError(error.message);
} else if (
(error instanceof Error &&
(error as any).type &&

Check warning on line 262 in src/api/warp.ts

View workflow job for this annotation

GitHub Actions / build (lint:check)

Unexpected any. Specify a different type
['TX_NOT_FOUND', 'TX_INVALID'].includes((error as any).type)) ||

Check warning on line 263 in src/api/warp.ts

View workflow job for this annotation

GitHub Actions / build (lint:check)

Unexpected any. Specify a different type
(typeof error === 'string' && (error as string).includes('TX_INVALID'))
) {
return new NotFoundError(`Contract not found. ${error}`);
Expand Down Expand Up @@ -417,7 +417,7 @@
functionName: string;
input: ParsedUrlQuery;
}): Promise<{
result: any;

Check warning on line 420 in src/api/warp.ts

View workflow job for this annotation

GitHub Actions / build (lint:check)

Unexpected any. Specify a different type
evaluationOptions: Partial<EvaluationOptions>;
}> {
try {
Expand Down
Loading